node.js 專案 安裝依賴項後出現 node-sass 報錯
報錯主要含以下資訊:
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
Node Sass could not find a binding for your current environment: Windows 32-bit with Node.js 6.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 6.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
@ ./src/assets/stylesheets/style.css 4:14-127 13:2-17:4 14:20-133
此時執行按照提示執行 npm rebuild node-sass 命令,(如若不行,則先執行npm install node-sass命令執行)
如果下載很慢的話 在後面加上 --registry https:
//registry.npm.taobao.org,
使用淘寶映象下載會快很多
然後再執行 node命令,啟動服務。
期初會出現亂七八糟的什麼msbuild.exe這些鬼東西,猜測還是跟nodejs版本有關,保持和原專案node版本一致就沒出問題了。