Open Corristo-X opened 2 months ago
You might want to look at the Windows steps at https://github.com/Automattic/node-canvas/blob/master/.github/workflows/ci.yaml#L31
Please do not post screenshot images because they are not searchable.
@cclauss unfortunately nothing helped from this link
I am in the same boat. I have tried downgrading both node and node-gyp to the versions indicated in the link and still am running into the error. Mine is while trying to build libdvbtee_parser. I'm using Python 3.13.0, Visual Studio 2022 with the C for Desktop workload, and node 18.12.0 and node-gyp 8 installed globally.
Python 3.12 and 3.13 will break node-gyp < v10 because the need setuptools
. See what!s new in Python 3.12 for details.
Thanks for the quick response! I downgraded python to 3.11 and am still encountering the same issues:
npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\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 '/m:8'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Users\nthin\AppData\Roaming\nvm\v18.12.0\node_modules\npm\node_modules\node-gyp\lib\build.js:201:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.26100
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\nthin\\AppData\\Roaming\\nvm\\v18.12.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "-j" "8"
npm ERR! gyp ERR! cwd C:\_projects\THEO\THEOplayer\src\theoplayer-next\web\streams\node_modules\libdvbtee_parser
npm ERR! gyp ERR! node -v v18.12.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\nthin\AppData\Local\npm-cache\_logs\2024-10-31T18_44_30_337Z-debug-0.log
I notice that the node-gyp version is listed in the output as 9.1.0, yet I've only installed 8.4.1, and that's the version in my nodejs install.
npm
bundles its own, internal, copy ofnode-gyp
.
Also, look at package.json
and package-lock.json
files in the local directories.
Thanks for the suggestion. Following that I was able to get it to use v8.4.1. That then asked for a Windows SDK for Visual Studio, which I installed and now I am back at the same place:
npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\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 '/m:8'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Users\nthin\AppData\Roaming\nvm\v18.12.0\node_modules\npm\node_modules\@npmcli\run-script\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.26100
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\nthin\\AppData\\Roaming\\nvm\\v18.12.0\\node_modules\\npm\\node_modules\\@npmcli\\run-script\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "-j" "8"
npm ERR! gyp ERR! cwd C:\_projects\web\streams\node_modules\libdvbtee_parser
npm ERR! gyp ERR! node -v v18.12.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
Any other suggestions?
Python 3.12 和 3.13 将破坏 node-gyp < v10,因为需要
setuptools
。有关详细信息,请参阅 Python 3.12 中的新增功能。
这个是啥意思,是说安装python3.12以上版本后,环境会被破坏吗导致打包失败
node-gyp v10.2.0 node v17.9.1/ same error on node v20.17.0 windows 11 on linux mint the program works fine for me.