我试着用

npm install steam

但是我得到一个错误说

我不确定如何解决这个问题,我已经在两个不同的npm模块安装上得到了这个。不过,我可以安装其他模块。

我的尝试: 安装任何需要的依赖项。(大熊座、node-gyp等) 安装Visual c++ 2005。 安装Visual c++ 2010。 将环境变量路径更改为/VC/(在另一个StackOverflow线程/问题上找到)。 谷歌,谷歌,谷歌。

我也得到一个错误尝试做:

npm install ursa

错误是:


当前回答

以管理员身份从cmd行尝试执行此操作

可选部分,如果您需要使用代理:

set HTTP_PROXY=http://login:password@your-proxy-host:your-proxy-port
set HTTPS_PROXY=http://login:password@your-proxy-host:your-proxy-port

运行这个:

npm install -g --production windows-build-tools

不需要Visual Studio。这里有你需要的东西。

引用:

https://www.npmjs.com/package/windows-build-tools https://github.com/felixrieseberg/windows-build-tools

其他回答

对于我来说,安装组件“VCBuild.exe”,只需下载向导,安装,并再次以管理员身份打开cmd并尝试再次运行。更新链接下载此处的向导

NPM install——global windows-build-tools

只需通过powershell运行此命令(右键单击并以管理员身份运行!)

为我工作过…

以管理员身份从cmd行尝试执行此操作

可选部分,如果您需要使用代理:

set HTTP_PROXY=http://login:password@your-proxy-host:your-proxy-port
set HTTPS_PROXY=http://login:password@your-proxy-host:your-proxy-port

运行这个:

npm install -g --production windows-build-tools

不需要Visual Studio。这里有你需要的东西。

引用:

https://www.npmjs.com/package/windows-build-tools https://github.com/felixrieseberg/windows-build-tools

在文件中明确提到如下: https://github.com/nodejs/node-gyp#installation

选项1:使用npm Install——global——production windows-build-tools安装所有必需的工具和配置 从升级的PowerShell或CMD.exe(以管理员身份运行)。

npm install --global --production windows-build-tools 

看看node-gyp的安装说明,你不能只是用npm安装node-gyp。我看到你已经安装了Visual c++,但还有更多。

你有什么版本的windows ?如果我知道,我可能会告诉你node-gyp指令的哪一部分你没有做,但看看它们,你应该能弄清楚。我也为此经历了一些痛苦。