NPM安装nodesass失败的原因

卸载重装都试过,还是不行。

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

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

NodeJSMinimum node-sass versionNode 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)

 

posted @ 2020-02-26 14:55  万里沙来手一挥  阅读(1665)  评论(0编辑  收藏  举报