Phantom build error during installation on Windows using Node.js v16
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 2
Description
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 ```node-gyp@7.1.2```
Command:
```npm add wdeasync@gamma w.process.tree.windows@gamma bufferfromfile@gamma```
[Failed workflow run ](https://github.com/volodymyrmigdal/node-gyp-experiments/runs/3322678114?check_suite_focus=true)
Also, I tried to:
- Update npm
- Update python
- Downgrade compiler
* **Node Version**: node v16.6.2, npm 7.20.3
* **Platform**: [Windows](https://github.com/volodymyrmigdal/node-gyp-experiments/runs/3322678114?check_suite_focus=true#step:1:1)
* **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 har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: 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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.17.0: 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! > bufferfromfile@0.4.328 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 node-pre-gyp@1.0.2
npm ERR! node-pre-gyp info using node@16.6.2 | 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 bufferfromfile@0.4.328 and node@16.6.2 (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 node-gyp@7.1.2
npm ERR! gyp info using node@16.6.2 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.6.2 | 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 node-gyp@7.1.2
npm ERR! gyp info using node@16.6.2 | 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. (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
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by rerunning the GitHub Actions workflow on Windows with Node.js v16 using the reported npm add command, then inspect the installation log around node-pre-gyp, node-gyp, the missing v8.h header, and the failed Node ABI 93 download. Done means the three modules install together successfully in that environment without falling back to a failing native build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100