報錯信息:css
Missing binding E:\webstorm\notepad\notepad\node_modules\node-sass\vendor\win32-x64-46\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 4.xvue
Found bindings for the following environments:
- Windows 64-bit with Node.js 6.xnode
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.git
@ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-7931a4ec!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-240 13:2-17:4 14:20-246github
解決方法:web
轉自:http://blog.csdn.net/zhu1500527791/article/details/53444870npm
Cannot download "https://hithub.com/sass/node-sass/releases/download/v3.13.0/win32-x64-46_binding.node"
從上圖第九行代碼能夠看出,致使node-sass
安裝失敗的緣由是由於沒法下載.node
文件,解決辦法就很簡單了,就是咱們把文件下載路徑複製一份到瀏覽器裏,而後使用瀏覽器下載文件就能夠了。瀏覽器
1.從node命令行中複製.node
文件下載連接並在瀏覽器打開下載文件sass
https://github.com/sass/node-sass/releases/download/v3.13.0/win32-x64-46_binding.node
2.文件下載成功後,在命令行工具輸入下面指令:ruby
set SASS_BINARY_PATH=D:/WorkCode/win32-x64-46_binding.node //PATH=後面是的下載的.node所在的路徑
設置SASS_BINARY_PATH
環境變量,目的是告訴程序直接使用本地的.node文件,無需從網上下載
3.配置完成,重新輸入指令:
npm i node-sass -D --verbose
接下來你就會發現node-sass安裝成功。