npm install node-sass 命令失败

问题描述 投票:0回答:2

我运行了命令

npm install node-sass
,并得到如下错误:

npm ERR! code 1
npm ERR! path D:\votingComputePlantformFrontEndWeb\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using nod[email protected]
npm ERR! gyp info using [email protected] | win32 | x64

我尝试过

npm install [email protected]
,然后我明白了

npm WARN 已弃用 [电子邮件受保护]:不再支持此版本的 tar,并且不会收到安全更新。请尽快升级。

node.js npm npm-install
2个回答
0
投票

这不是错误。你的 tar 已经过时了。要解决此问题,请运行以下命令:-

npm i tar -g 

然后输入确定。现在您的问题是

npm WARN deprecated [email protected]: This version of tar is no longer supported,
,并且不会收到安全更新。将被修复。


0
投票

https://sass-lang.com/blog/libsass-is-deprecated

根据 sass 博客,node sass 已被弃用,你应该使用 dart sass。 就我个人而言,我安装了“sass”而不是“node-sass”,并且无论 Python 如何,它都可以工作。

npm install sass
© www.soinside.com 2019 - 2024. All rights reserved.