运行 npm install 给了我这些错误

时间:2021-05-21 09:09:44

标签: node.js angular npm-install node-sass

options = { 'page-height': '70in', 'page-width': '70in', }

I have tried a lot of things in order to fix this but can t find a solution, installed node sass that just added more problems, it used to run without a problem now I keep getting errors

我不知道该怎么办我也尝试安装 node-sass 但没有成功

2 个答案:

答案 0 :(得分:0)

我昨天遇到了类似的问题。我通过确保在默认目录中下载了 python 并安装了 Windows Build Tools 来修复它,因为 node-sass 需要 node-gyp,而 node-gyp 反过来需要 Windows Build Tools。

您可以使用管理 shell 下载它,但转到此 page,然后找到并下载“Build Tools for Visual Studio”同样容易。还可以找到解释该过程的好视频 here。如前所述,您可以使用 powershell 进行安装,前提是它以管理员身份运行,此过程可以在它的 npm 页面 here 上找到。

删除您的节点模块文件夹并在完成后重新运行 npm install 可能是值得的。

答案 1 :(得分:0)

我遇到了类似的问题。尝试删除 package-lock.json,然后重新运行“npm install”。