安装nodejs6.9x以后,原来在nodejs4.2.x中运行正常的程序出现的问题。
看错误信息,由于NodeJs版本升级导致的。
到提示的目录下运行:npm rebuild node-sass -g 无效果
运行:
npm install -g node-sass
npm rebuild
还是不行
运行 node -e "console.log(require.resolve(‘node-sass‘))"
查看当前node-sass所在位置
还是不行。放弃环境调整,在新环境下 ionic start myapp 重新重成一个ioinc V1 项目,将自定义内容复制进去,OK
-------------------------------------------------------------
错误信息
D:\IonicUI\tabApp>ionic serve
There is an error in your gulpfile:
Error: Missing binding D:\IonicUI\tabApp\node_modules\gulp-sass\node_modules\nod
e-sass\vendor\win32-x64-48\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit
with Node.js 6.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 4.x
This usually happens because your environment has changed since running `npm ins
tall`.
Run `npm rebuild node-sass` to build the binding for your current environment.
at Object.<anonymous> (D:\IonicUI\tabApp\node_modules\gulp-sass\node_modules
\node-sass\lib\index.js:15:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\IonicUI\tabApp\node_modules\gulp-sass\index.js:187
:21)
at Module._compile (module.js:570:32)
D:\IonicUI\tabApp>