Error when creating the first pluggable widget using NodeJS+Yeoman

0
Environnment: - Windows 11 in parallel with MBP M1 - NodeJS v16.16 - Yeoman install via npm install Error logs as below: - File configuration done, now running npm install to install dependencies Changes to package.json were detected. Error detecting the package manager. Falling back to npm. Running npm install for you to install the required dependencies. npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm WARN deprecated @types/easy-table@1.2.0: This is a stub types definition. easy-table provides its own type definitions, so you do not need this installed. npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. 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 uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0 npm ERR! code 1 npm ERR! path C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --update-binary npm ERR! Warning: Missing input files: npm ERR! C:\GTK\bin\zlib1.dll npm ERR! C:\GTK\bin\libgmodule-2.0-0.dll npm ERR! C:\GTK\bin\libpng14-14.dll npm ERR! C:\GTK\bin\libpangowin32-1.0-0.dll npm ERR! C:\GTK\bin\libfontconfig-1.dll npm ERR! C:\GTK\bin\libgthread-2.0-0.dll npm ERR! C:\GTK\bin\libpangoft2-1.0-0.dll npm ERR! C:\GTK\bin\libfreetype-6.dll npm ERR! C:\GTK\bin\libintl-8.dll npm ERR! C:\GTK\bin\libexpat-1.dll npm ERR! C:\GTK\bin\libgobject-2.0-0.dll npm ERR! C:\GTK\bin\libpango-1.0-0.dll npm ERR! C:\GTK\bin\libcairo-2.dll npm ERR! C:\GTK\bin\libpangocairo-1.0-0.dll npm ERR! C:\GTK\bin\libglib-2.0-0.dll npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. npm ERR!   Backend.cc npm ERR! C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\src\backend\Backend.h(3,10): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory [C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\canvas.vcxproj] npm ERR! Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Users\Yiming.Zeng\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --update-binary --module=C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\Release --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.9 npm ERR! node-pre-gyp info using node@16.16.0 | win32 | ia32 npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v93-win32-unknown-ia32.tar.gz npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v93-win32-unknown-ia32.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.9.3 and node@16.16.0 (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/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v93-win32-unknown-ia32.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@16.16.0 | win32 | ia32 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@16.16.0 | win32 | ia32 npm ERR! gyp info find Python using Python version 3.10.6 found at "C:\Users\Yiming.Zeng\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe" npm ERR! gyp info find VS using VS2019 (16.11.32802.440) found at: npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Users\Yiming.Zeng\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args   'C:\\Users\\Yiming.Zeng\\AppData\\Roaming\\npm\\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   'C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas\\build\\config.gypi', npm ERR! gyp info spawn args   '-I', npm ERR! gyp info spawn args   'C:\\Users\\Yiming.Zeng\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi', npm ERR! gyp info spawn args   '-I', npm ERR! gyp info spawn args   'C:\\Users\\Yiming.Zeng\\AppData\\Local\\node-gyp\\Cache\\16.16.0\\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\\Yiming.Zeng\\AppData\\Local\\node-gyp\\Cache\\16.16.0', npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\Yiming.Zeng\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp', npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Yiming.Zeng\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.16.0\\\\<(target_arch)\\\\node.lib', npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas', 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   'C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas\\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@9.1.0 npm ERR! gyp info using node@16.16.0 | win32 | ia32 npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\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=Win32' 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\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1 npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Users\Yiming.Zeng\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:201:23) npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Windows_NT 10.0.22000 npm ERR! gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Yiming.Zeng\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--update-binary" "--module=C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas\\build\\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93" npm ERR! gyp ERR! cwd C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas npm ERR! gyp ERR! node -v v16.16.0 npm ERR! gyp ERR! node-gyp -v v9.1.0 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:\Program Files (x86)\nodejs\node.exe C:\Users\Yiming.Zeng\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --update-binary --module=C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\Release --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> (C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23) npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:527:28) npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16) npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.22000 npm ERR! node-pre-gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--update-binary" npm ERR! node-pre-gyp ERR! cwd C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas npm ERR! node-pre-gyp ERR! node -v v16.16.0 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9 npm ERR! node-pre-gyp ERR! not ok npm ERR! A complete log of this run can be found in: File configuration done, now running npm install to install dependencies Changes to package.json were detected. Error detecting the package manager. Falling back to npm. Running npm install for you to install the required dependencies. npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm WARN deprecated @types/easy-table@1.2.0: This is a stub types definition. easy-table provides its own type definitions, so you do not need this installed. npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. 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 uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0 npm ERR! code 1 npm ERR! path C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --update-binary npm ERR! Warning: Missing input files: npm ERR! C:\GTK\bin\zlib1.dll npm ERR! C:\GTK\bin\libgmodule-2.0-0.dll npm ERR! C:\GTK\bin\libpng14-14.dll npm ERR! C:\GTK\bin\libpangowin32-1.0-0.dll npm ERR! C:\GTK\bin\libfontconfig-1.dll npm ERR! C:\GTK\bin\libgthread-2.0-0.dll npm ERR! C:\GTK\bin\libpangoft2-1.0-0.dll npm ERR! C:\GTK\bin\libfreetype-6.dll npm ERR! C:\GTK\bin\libintl-8.dll npm ERR! C:\GTK\bin\libexpat-1.dll npm ERR! C:\GTK\bin\libgobject-2.0-0.dll npm ERR! C:\GTK\bin\libpango-1.0-0.dll npm ERR! C:\GTK\bin\libcairo-2.dll npm ERR! C:\GTK\bin\libpangocairo-1.0-0.dll npm ERR! C:\GTK\bin\libglib-2.0-0.dll npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. npm ERR!   Backend.cc npm ERR! C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\src\backend\Backend.h(3,10): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory [C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\canvas.vcxproj] npm ERR! Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Users\Yiming.Zeng\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --update-binary --module=C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\Release --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.9 npm ERR! node-pre-gyp info using node@16.16.0 | win32 | ia32 npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v93-win32-unknown-ia32.tar.gz npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v93-win32-unknown-ia32.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.9.3 and node@16.16.0 (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/Automattic/node-canvas/releases/download/v2.9.3/canvas-v2.9.3-node-v93-win32-unknown-ia32.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@16.16.0 | win32 | ia32 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@16.16.0 | win32 | ia32 npm ERR! gyp info find Python using Python version 3.10.6 found at "C:\Users\Yiming.Zeng\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe" npm ERR! gyp info find VS using VS2019 (16.11.32802.440) found at: npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Users\Yiming.Zeng\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args   'C:\\Users\\Yiming.Zeng\\AppData\\Roaming\\npm\\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   'C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas\\build\\config.gypi', npm ERR! gyp info spawn args   '-I', npm ERR! gyp info spawn args   'C:\\Users\\Yiming.Zeng\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi', npm ERR! gyp info spawn args   '-I', npm ERR! gyp info spawn args   'C:\\Users\\Yiming.Zeng\\AppData\\Local\\node-gyp\\Cache\\16.16.0\\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\\Yiming.Zeng\\AppData\\Local\\node-gyp\\Cache\\16.16.0', npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\Yiming.Zeng\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp', npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Yiming.Zeng\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.16.0\\\\<(target_arch)\\\\node.lib', npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas', 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   'C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas\\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@9.1.0 npm ERR! gyp info using node@16.16.0 | win32 | ia32 npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\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=Win32' 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\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1 npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Users\Yiming.Zeng\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:201:23) npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Windows_NT 10.0.22000 npm ERR! gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Yiming.Zeng\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--update-binary" "--module=C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\canvas\\build\\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93" npm ERR! gyp ERR! cwd C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas npm ERR! gyp ERR! node -v v16.16.0 npm ERR! gyp ERR! node-gyp -v v9.1.0 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:\Program Files (x86)\nodejs\node.exe C:\Users\Yiming.Zeng\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --update-binary --module=C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas\build\Release --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> (C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23) npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:527:28) npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16) npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.22000 npm ERR! node-pre-gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Yiming.Zeng\\Documents\\Mx-Proj\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--update-binary" npm ERR! node-pre-gyp ERR! cwd C:\Users\Yiming.Zeng\Documents\Mx-Proj\node_modules\canvas npm ERR! node-pre-gyp ERR! node -v v16.16.0 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9 npm ERR! node-pre-gyp ERR! not ok npm ERR! A complete log of this run can be found in:
asked
1 answers
0

It looks like it's trying to build Canvas from source for you which in turn depends on the GTK 2 library for Windows. I doubt that you should be trying to build that yourself. Can you try npm install canvas first and see if that makes a difference?

 

answered