Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing latest beta on Windows (weak compilation error) #5006

Closed
pleunv opened this issue Dec 3, 2017 · 5 comments
Closed

Error installing latest beta on Windows (weak compilation error) #5006

pleunv opened this issue Dec 3, 2017 · 5 comments

Comments

@pleunv
Copy link

pleunv commented Dec 3, 2017

Installing the latest beta (21.3.0-beta.11 at time of writing) gives me a compile error during install. Seems to be originating from the weak dependency which is used in jest-leak-detector. Case of missing windows binaries? See TooTallNate/node-weak#22.
Getting compilation working on Windows tends to be a bit of a minefield that I've been trying to avoid so far as it's a common source of "works on my machine" problems within a team, I'd prefer to keep it that way. I'm not sure what your stance is on the matter.

Full log:

warning "jest > jest-cli > jest-environment-jsdom > jsdom > request-promise-native > [email protected]" has unmet peer dependency "request@^2.34".
[5/5] Building fresh packages...
[1/1] ⠈ weak: TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified.
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
error C:\Projects\cs-4.0\client\cs-apps\packages\cs-app\node_modules\weak: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\Projects\cs-4.0\client\cs-apps\packages\cs-app\node_modules\weak
Output:
C:\Projects\cs-4.0\client\cs-apps\packages\cs-app\node_modules\weak {git}{hg}
{lamb} if not defined npm_config_node_gyp (node "C:\Tools\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Tools\Python27\python.EXE
gyp info spawn args [ 'C:\\Users\\Pleun\\AppData\\Roaming\\nvm\\v8.9.1\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Projects\\cs-4.0\\client\\cs-apps\\packages\\cs-app\\node_modules\\weak\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Pleun\\AppData\\Roaming\\nvm\\v8.9.1\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Pleun\\.node-gyp\\8.9.1\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Pleun\\.node-gyp\\8.9.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\Pleun\\AppData\\Roaming\\nvm\\v8.9.1\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\Pleun\\.node-gyp\\8.9.1\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Projects\\cs-4.0\\client\\cs-apps\\packages\\cs-app\\node_modules\\weak',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Projects\\cs-4.0\\client\\cs-apps\\packages\\cs-app\\node_modules\\weak\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Projects\cs-4.0\client\cs-apps\packages\cs-app\node_modules\weak\build\weakref.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:\Users\Pleun\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Tools\\nodejs\\node.exe" "C:\\Tools\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Projects\cs-4.0\client\cs-apps\packages\cs-app\node_modules\weak
@pleunv pleunv changed the title Error installing latest beta on Windows Error installing latest beta on Windows (weak compilation error) Dec 3, 2017
@pleunv
Copy link
Author

pleunv commented Dec 3, 2017

Fwiw, neither manually installing C++ redistributables nor npm i -g windows-build-tools seems to work.

@SimenB
Copy link
Member

SimenB commented Dec 3, 2017

This is fixed in #4984.

@cpojer mind tagging another beta with it?

@cpojer
Copy link
Member

cpojer commented Dec 4, 2017

Will do later today.

@nasreddineskandrani
Copy link
Contributor

nasreddineskandrani commented Dec 15, 2018

just in case
to get it to work i had to do:

$ npm install --global windows-build-tools
$ yarn config set msvs_version 2017 --global

*care in the futur you may need to update the 2017 from second command to a newer version.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants