Javascript Windows中的NPM模块编译问题(Visual Studio 2015)

Javascript Windows中的NPM模块编译问题(Visual Studio 2015),javascript,c++,node.js,visual-c++,npm,Javascript,C++,Node.js,Visual C++,Npm,我想安装mean cliNPM模块,以便使用堆栈。我遇到的问题是在安装mean cli时编译一些C文件 我在windows powershell中以管理员身份输入了npm安装-g--msvs_version=2013 mean cli。我还安装了VS 2015社区版,并在我的用户环境变量中设置了GYP_MSVS_VERSION=2013 系统: Windows 7.1 64bit C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Mi

我想安装
mean cli
NPM模块,以便使用堆栈。我遇到的问题是在安装
mean cli
时编译一些
C
文件

我在windows powershell中以管理员身份输入了npm安装-g--msvs_version=2013 mean cli。我还安装了
VS 2015社区版
,并在我的用户环境变量中设置了
GYP_MSVS_VERSION=2013

系统:

Windows 7.1 64bit
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build t
ools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install v120 bui
ld tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-cli
ck the solution, and then selecting "Retarget solution". 


[C:\Users\Ramin\AppData\Roaming\npm\node_modules\mean-cli\node
_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:2
70:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node
-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Ramin\AppData\Roaming\npm\node_modules\mean-cli\node_modules\mongoose\node_modules\mongodb\node_mo
dules\mongodb-core\node_modules\kerberos
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN installMany nopt was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany npmlog was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany request was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany semver was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany tar was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany tar-pack was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany mkdirp was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany rc was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany rimraf was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
错误:

Windows 7.1 64bit
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build t
ools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install v120 bui
ld tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-cli
ck the solution, and then selecting "Retarget solution". 


[C:\Users\Ramin\AppData\Roaming\npm\node_modules\mean-cli\node
_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:2
70:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node
-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Ramin\AppData\Roaming\npm\node_modules\mean-cli\node_modules\mongoose\node_modules\mongodb\node_mo
dules\mongodb-core\node_modules\kerberos
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN installMany nopt was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany npmlog was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany request was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany semver was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany tar was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany tar-pack was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany mkdirp was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany rc was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany rimraf was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree

问题是什么?

这似乎比c++问题更严重,尤其是因为输出似乎抱怨没有找到正确版本的Microsoft构建工具,而不是抛出任何特定的c或c++相关错误。@jaggedSpire,好的,你有什么建议吗?我建议你的问题可能有更好的标签。也许这就是你要找的?还是?