node-sass 安裝



npm ERR! node v5.2.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.8.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.8.0 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     K:\vuejs\my-project\npm-debug.log


解決方法1:
  1. 別的項目里拷貝node-sass

后提示:ERROR in Cannot find module 'lodash.clonedeep'

  1. npm i lodash.assign (百度了下,看到說要下載這個,也不知道是啥玩意兒)OK了

但是還是不知道哪個報錯啥原因。。。

 

解決方法2:

cnpm下載node-sass失敗解決方法:
可能由於網絡問題下載win32-x64-47_binding.node失敗,去https://github.com/sass/node-...這里下載需要的版本
下載后放到某目錄下,如我的放到D盤根目錄
1執行命令: set SASS_BINARY_PATH=D:win32-x64-47_binding.node
2安裝node-sass: cnpm i node-sass
3安裝node-sass成功后繼續執行cnpm i下載其他依賴即可

npm install cnpm

cnpm install node-sass


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM