Node Sass does not yet support your current environment解决办法

在启动Nodejs项目时出现以下Error: 

Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (57)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v3.13.1
    at module.exports (/opt/care1.0.0/other_modules/nodejs/node_modules/_node-sass@3.13.1@node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/opt/care1.0.0/other_modules/nodejs/node_modules/_node-sass@3.13.1@node-sass/lib/index.js:14:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/care1.0.0/other_modules/nodejs/template_renderer/routes/index.js:9:12)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/care1.0.0/other_modules/nodejs/app.js:10:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
error: Forever detected script exited with code: 1

然后先卸载再安装node-sass:

cnpm uninstall --save node-sass
cnpm install --save node-sass

还是出现Error:

✖ Install fail! Error: post install error, please remove node_modules before retry!
Run "sh -c node scripts/install.js" error, exit code 1
Error: post install error, please remove node_modules before retry!
Run "sh -c node scripts/install.js" error, exit code 1
    at ChildProcess.proc.on.code (/home/ec2-user/nodejs/lib/node_modules/cnpm/node_modules/runscript/index.js:74:21)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
所以根据上面的提示
please remove node_modules before retry

就删除nodejs项目目录下的node_modules:

rm -rf ./node_modules

重新执行整个cnpm install

cnpm install
结果就可以了。



  • 17
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 9
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值