微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

运行 npm install 给了我这些错误

如何解决运行 npm install 给了我这些错误

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 但没有成功

解决方法

我昨天遇到了类似的问题。我通过确保在默认目录中下载了 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 可能是值得的。

,

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。