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

Phantom build error during installation on Windows using Node.js v16 #2484

Closed
vmihdal opened this issue Aug 13, 2021 · 2 comments · Fixed by #2846
Closed

Phantom build error during installation on Windows using Node.js v16 #2484

vmihdal opened this issue Aug 13, 2021 · 2 comments · Fixed by #2846
Labels

Comments

@vmihdal
Copy link

vmihdal commented Aug 13, 2021

Hello. I'm trying to install several modules at once, but installation fails most of the time.
Separate installation of each of the modules works.
I can reproduce this problem only on GitHub action using Windows machine and Node.js 16.x.
Bundled node-gyp is updated during the installation, however npm still reports [email protected]
Command:
npm add wdeasync@gamma w.process.tree.windows@gamma bufferfromfile@gamma

Failed workflow run

Also, I tried to:

  • Update npm
  • Update python
  • Downgrade compiler
  • Node Version: node v16.6.2, npm 7.20.3
  • Platform: Windows
  • Compiler: VS2019 (16.10.31515.178)
  • Module: wdeasync@gamma, w.process.tree.windows@gamma, bufferfromfile@gamma
Log:
npm add wdeasync@gamma w.process.tree.windows@gamma bufferfromfile@gamma
  shell: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.EXE -command ". '{0}'"
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\bufferfromfile
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node step/Install.ss
npm ERR! > [email protected] node-pre-gyp-install
npm ERR! > node-pre-gyp install --update-binary --fallback-to-build
npm ERR! 
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR!   Main.cpp
npm ERR! D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\wbasenodejscpp\cpp\IncludeNode.hpp(4,10): fatal error C1083: Cannot open include file: 'v8.h': No such file or directory [D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\bufferfromfile\build\bufferfromfile.vcxproj]
npm ERR! Failed to execute 'C:\hostedtoolcache\windows\node\16.6.2\x64\node.exe C:\hostedtoolcache\windows\node\16.6.2\x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --update-binary --fallback-to-build --module=D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\bufferfromfile\binding\bufferfromfile.node --module_name=bufferfromfile --module_path=D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\bufferfromfile\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp http GET https://github.com/Wandalen/BufferFromFile/releases/download/0.4.328/bufferfromfile-v0.4.328-node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Wandalen/BufferFromFile/releases/download/0.4.328/bufferfromfile-v0.4.328-node-v93-win32-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Wandalen/BufferFromFile/releases/download/0.4.328/bufferfromfile-v0.4.328-node-v93-win32-x64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.7.9 found at "C:\hostedtoolcache\windows\Python\3.7.9\x64\python3.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.6.2/node-v16.6.2-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.6.2/node-v16.6.2-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.6.2/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v16.6.2/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.6.2/win-x64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.6.2/win-arm64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.6.2/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.6.2/win-x64/node.lib
npm ERR! gyp http 404 https://nodejs.org/download/release/v16.6.2/win-arm64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.6.2/win-x86/node.lib
npm ERR! gyp info find VS using VS2019 (16.10.31515.178) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! (node:3000) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn C:\hostedtoolcache\windows\Python\3.7.9\x64\python3.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'C:\\hostedtoolcache\\windows\\node\\16.6.2\\x64\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'msvs',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'D:\\a\\node-gyp-experiments\\node-gyp-experiments\\node_modules\\bufferfromfile\\build\\config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\hostedtoolcache\\windows\\node\\16.6.2\\x64\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\runneradmin\\AppData\\Local\\node-gyp\\Cache\\16.6.2\\include\\node\\common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\runneradmin\\AppData\\Local\\node-gyp\\Cache\\16.6.2',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\hostedtoolcache\\windows\\node\\16.6.2\\x64\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\runneradmin\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.6.2\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=D:\\a\\node-gyp-experiments\\node-gyp-experiments\\node_modules\\bufferfromfile',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'D:\\a\\node-gyp-experiments\\node-gyp-experiments\\node_modules\\bufferfromfile\\build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'build/binding.sln',
npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args   '/nologo',
npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\hostedtoolcache\windows\node\16.6.2\x64\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.17763
npm ERR! gyp ERR! command "C:\\hostedtoolcache\\windows\\node\\16.6.2\\x64\\node.exe" "C:\\hostedtoolcache\\windows\\node\\16.6.2\\x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--update-binary" "--fallback-to-build" "--module=D:\\a\\node-gyp-experiments\\node-gyp-experiments\\node_modules\\bufferfromfile\\binding\\bufferfromfile.node" "--module_name=bufferfromfile" "--module_path=D:\\a\\node-gyp-experiments\\node-gyp-experiments\\node_modules\\bufferfromfile\\binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\bufferfromfile
npm ERR! gyp ERR! node -v v16.6.2
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\hostedtoolcache\windows\node\16.6.2\x64\node.exe C:\hostedtoolcache\windows\node\16.6.2\x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --update-binary --fallback-to-build --module=D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\bufferfromfile\binding\bufferfromfile.node --module_name=bufferfromfile --module_path=D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\bufferfromfile\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.17763
npm ERR! node-pre-gyp ERR! command "C:\\hostedtoolcache\\windows\\node\\16.6.2\\x64\\node.exe" "D:\\a\\node-gyp-experiments\\node-gyp-experiments\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--update-binary" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd D:\a\node-gyp-experiments\node-gyp-experiments\node_modules\bufferfromfile
npm ERR! node-pre-gyp ERR! node -v v16.6.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.2
npm ERR! node-pre-gyp ERR! not ok

@vraravam
Copy link

We have the same error: https://github.com/getferdi/ferdi/runs/4196156385?check_suite_focus=true#step:10:73 - on the latest windows runner provided by Github Actions. A fix would be really helpful!

@dmvict
Copy link

dmvict commented Dec 17, 2021

We added experimental repository for this issue.

The results are presented in README.md.
Summary of the experiment - node-gyp cannot install three binary modules.

The workflow with installing of three binary modules
The workflow with installing of combinations of two binary modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants