Nice programing

node gyp error TRACKER : 오류 TRK0005 : 찾기 실패 :“CL.exe”.

nicepro 2020. 10. 15. 21:41
반응형

node gyp error TRACKER : 오류 TRK0005 : 찾기 실패 :“CL.exe”. 시스템이 지정된 파일을 찾을 수 없습니다


Visual Studio Community 2015, Python v2.7.3이 설치된 Windows 10 컴퓨터에 bcrypt를 설치하고 싶지만 다음 오류가 발생합니다.

노드 버전 v4.2.1 node-gyp v3.0.3

npm install bcrypt 


C:\Users\ASMIN\Desktop\M2\app>npm install bcrypt
npm WARN package.json eapp@1.0.0 No description
npm 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:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt
> node-gyp rebuild




 C:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node
    -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)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.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:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
    TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt\build\bcrypt_lib.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: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 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\ASMIN\Desktop\M2\app\node_modules\bcrypt
    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 Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-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:\Users\ASMIN\Desktop\M2\app\npm-debug.log

다른 모듈에서도 같은 문제가 발생했습니다.

나는 그것을 다음과 같이 해결했다.

  • Visual Studio Community 2013 설치
  • 운영 npm config set msvs_version 2013 --global
  • 운영 npm install bcrypt

쉽게 VS2015에서 C ++ 프로젝트를 생성하여이 문제를 해결했습니다.

기본적으로 C ++ 프로젝트를 만들기로 선택하면 VS2015는 특정 구성 요소를 설치하라는 메시지를 표시하고 설치 만 허용합니다. 문제가 해결됩니다. (BTW, Win10에서 VS2015를 사용하고 있습니다)


karma (npm 모듈)를 설치하는 데 문제가 있습니다. Visual Studio 2015 설치에서 Visual C ++를 설치했는데 제대로 작동했습니다.


I had a similar problem while building a typical hello_world.c console application. The reason was that I decided to install VS2015 to "C:\program files (x86)\msvc14", but the installer installed cl.exe to the default "c:\program files (x86)\Microsoft Visual Studio 14.0" path. Which is obviously a serious bug in the setup program.

I merged all the content of "Microsoft Visual Studio 14.0" into the "msvc14" directory, and now all works fine.


Putting this here in case someone has the same issue:

I already had the C++ libraries installed.

Updating Node worked for me.

I assume the older version of node just didn't support my VS2017.


Just gonna drop this here in case someone needs this to work with VS 2017 and ethereum web3.js. I faced this problem when installing web3.js

  1. Update Node.js to 8.11.1
  2. Create a Visual C++ Project in VS 2017, and make sure it built succesfully
  3. Set the config msvs_version

    npm config set msvs_version 2017 --global

  4. then npm install web3 -g --save

참고URL : https://stackoverflow.com/questions/33183161/node-gyp-error-tracker-error-trk0005-failed-to-locate-cl-exe-the-system-c

반응형