NPM安裝nodesass失敗的原因


卸載重裝都試過,還是不行。

最根本的原因,是需要根據node版本安裝不同的node-sass.

參照:https://github.com/sass/node-sass

NodeJS Minimum node-sass version Node Module
Node 13 4.13+ 79
Node 12 4.12+ 72
Node 11 4.10+ 67
Node 10 4.9+ 64
Node 8 4.5.3+ 57

查看node版本,重新安裝后,問題解決。

PS E:\DEV\NetBeans\renren-fast-vue> node -v
v12.13.1
PS E:\DEV\NetBeans\renren-fast-vue> cnpm install node-sass@4.12.0
√ Installed 1 packages
√ Linked 168 latest versions
[1/1] scripts.install node-sass@4.12.0 run "node scripts/install.js", root: "E:\\DEV\\NetBeans\\renren-fast-vue\\node_modules\\_node-sass@4.12.0@node-sass"
Downloading binary from https://cdn.npm.taobao.org/dist/node-sass/v4.12.0/win32-x64-72_binding.node
Download complete
nding.node
Caching binary to C:\Users\flashmx\.npminstall_tarball\node-sass\4.12.0\win32-x64-72_binding.node
[1/1] scripts.install node-sass@4.12.0 finished in 2s
[1/1] scripts.postinstall node-sass@4.12.0 run "node scripts/build.js", root: "E:\\DEV\\NetBeans\\renren-fast-vue\\node_modules\\_node-sass@4.12.0@node-sass"
Binary found at E:\DEV\NetBeans\renren-fast-vue\node_modules\_node-sass@4.12.0@node-sass\vendor\win32-x64-72\binding.node
Testing binary
Binary is fine
[1/1] scripts.postinstall node-sass@4.12.0 finished in 448ms
√ Run 1 scripts
Recently updated (since 2020-02-19): 2 packages (detail see file E:\DEV\NetBeans\renren-fast-vue\node_modules\.recently_updates.txt)
  Today:
    → node-sass@4.12.0 › meow@3.7.0 › normalize-package-data@2.5.0 › hosted-git-info@^2.1.4(2.8.6) (01:16:32)  
√ All packages installed (178 packages installed from npm registry, used 38s(network 30s), speed 23.62kB/s, json 169(319.54kB), tarball 380.76kB)

 


免責聲明!

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



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