节点gyp错误TRACKER:错误TRK0005:找不到:“ CL.exe”该系统找不到指定的文件

【字号: 日期:2024-04-16浏览:22作者:雯心
(adsbygoogle = window.adsbygoogle || []).push({}); 如何解决节点gyp错误TRACKER:错误TRK0005:找不到:“ CL.exe”该系统找不到指定的文件?

我在另一个模块上遇到了同样的问题。

我通过以下方法解决了它:

安装Visual Studio Community 2013跑 npm config set msvs_version 2013 --global跑 npm install bcrypt解决方法

我想在安装了Visual Studio Community 2015,Python v2.7.3的Windows10计算机上安装bcrypt,但出现以下错误。

节点版本v4.2.1 node-gyp v3.0.3

npm install bcryptC:UsersASMINDesktopM2app>npm install bcryptnpm WARN package.json eapp@1.0.0 No descriptionnpm WARN package.json eapp@1.0.0 No repository field.npm WARN package.json eapp@1.0.0 No README data> bcrypt@0.8.5 install C:UsersASMINDesktopM2appnode_modulesbcrypt> node-gyp rebuild C:UsersASMINDesktopM2appnode_modulesbcrypt>if not defined npm_config_node_gyp (node 'C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin....node_modulesnode-gypbinnode -gyp.js' rebuild ) else (node rebuild ) Building the projects in this solution one at a time. To enable parallel build,please add the '/m' switch. C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersio n or PlatformToolset may be set to an invalid version number. [C:UsersASMINDesktopM2appnode_modulesbcryptbuildbcrypt_lib.vcxproj] TRACKER : error TRK0005: Failed to locate: 'CL.exe'. The system cannot find the file specified. [C:UsersASMINDesktopM2appnode_modulesbcryptbuildbcrypt_lib.vcxproj] gyp ERR! build error gyp ERR! stack Error: `C:Program Files (x86)MSBuild14.0binmsbuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.js:270: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 10.0.10240 gyp ERR! command 'C:Program Filesnodejsnode.exe' 'C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js' 'rebuild' gyp ERR! cwd C:UsersASMINDesktopM2appnode_modulesbcrypt gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm ERR! Windows_NT 10.0.10240 npm ERR! argv 'C:Program Filesnodejsnode.exe' 'C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js' 'install' 'bcrypt' npm ERR! node v4.2.1 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@0.8.5 install script ’node-gyp rebuild’. npm ERR! This is most likely a problem with the bcrypt package,npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls bcrypt npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:UsersASMINDesktopM2appnpm-debug.log

相关文章: