hashlips_art_engine: npm run build error

(Windows 8.1) When i run npm run generate or npm run build or node index.js i get this error:

PS C:\hashlips_art_engine-1.1.2_patch_v6> npm run generate

hashlips_art_engine@1.1.1 generate node index.js

node:internal/modules/cjs/loader:936 throw err; ^

Error: Cannot find module ‘…/build/Release/canvas.node’ Require stack:

  • C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\lib\bindings.js
  • C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\lib\canvas.js
  • C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\index.js
  • C:\hashlips_art_engine-1.1.2_patch_v6\src\main.js
  • C:\hashlips_art_engine-1.1.2_patch_v6\index.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:999:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\lib\bindings.js:3:18) at Module._compile (node:internal/modules/cjs/loader:1097:14) at Object.Module._extensions…js (node:internal/modules/cjs/loader:1151:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:999:19) { code: ‘MODULE_NOT_FOUND’, requireStack: [ ‘C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\lib\bindings.js’, ‘C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\lib\canvas.js’, ‘C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\index.js’, ‘C:\hashlips_art_engine-1.1.2_patch_v6\src\main.js’, ‘C:\hashlips_art_engine-1.1.2_patch_v6\index.js’ ] }

Node.js v17.6.0

Then i run npm install canvas i get this:

PS C:\hashlips_art_engine-1.1.2_patch_v6> npm install canvas npm ERR! code 1 npm ERR! path C:\hashlips_art_engine-1.1.2_patch_v6\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 npm ERR! ??? ??? ?? ??? ? ?? ???. ??? ??? ??? ???, ??? ??? “/m”. npm ERR! Copying C:/libjpeg-turbo/bin/jpeg62.dll to C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\Release
npm ERR! ??? ???: 1. npm ERR! Backend.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! ImageBackend.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! PdfBackend.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\gtk\include\glib-2.0\glib\gutils.h(369): warning C5033: “register” ??? ?? ??? ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\libjpeg-turbo\include\jmorecfg.h(216): warning C4005: FAR: ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\program files\windows kits\10\include\10.0.17763.0\shared\minwindef.h(150): note: ?. ??? ??? “FAR” npm ERR! SvgBackend.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\gtk\include\glib-2.0\glib\gutils.h(369): warning C5033: “register” ??? ?? ??? ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\libjpeg-turbo\include\jmorecfg.h(216): warning C4005: FAR: ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\program files\windows kits\10\include\10.0.17763.0\shared\minwindef.h(150): note: ?. ??? ??? “FAR” npm ERR! BMPParser.cc npm ERR! c:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\src\bmp\bmpparser.cc(186): warning C4018: >: ??? ??? ? ??? ? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\src\bmp\bmpparser.cc(201): warning C4018: >: ??? ??? ? ??? ? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! Backends.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\gtk\include\glib-2.0\glib\gutils.h(369): warning C5033: “register” ??? ?? ??? ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\libjpeg-turbo\include\jmorecfg.h(216): warning C4005: FAR: ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\program files\windows kits\10\include\10.0.17763.0\shared\minwindef.h(150): note: ?. ??? ??? “FAR” npm ERR! Canvas.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\gtk\include\glib-2.0\glib\gutils.h(369): warning C5033: “register” ??? ?? ??? ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\libjpeg-turbo\include\jmorecfg.h(216): warning C4005: FAR: ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\program files\windows kits\10\include\10.0.17763.0\shared\minwindef.h(150): note: ?. ??? ??? “FAR” npm ERR! CanvasGradient.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\gtk\include\glib-2.0\glib\gutils.h(369): warning C5033: “register” ??? ?? ??? ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! CanvasPattern.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\gtk\include\glib-2.0\glib\gutils.h(369): warning C5033: “register” ??? ?? ??? ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\libjpeg-turbo\include\jmorecfg.h(216): warning C4005: FAR: ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\program files\windows kits\10\include\10.0.17763.0\shared\minwindef.h(150): note: ?. ??? ??? “FAR” npm ERR! CanvasRenderingContext2d.cc npm ERR! c:\users???\appdata\local\node-gyp\cache\17.6.0\include\node\v8-typed-array.h(28): warning C4309: static_cast: ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\gtk\include\glib-2.0\glib\gutils.h(369): warning C5033: “register” ??? ?? ??? ??? ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\libjpeg-turbo\include\jmorecfg.h(216): warning C4005: FAR: ??? ??? [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\program files\windows kits\10\include\10.0.17763.0\shared\minwindef.h(150): note: ?. ??? ??? “FAR” npm ERR! c:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\src\util.h(31): error C2039: toupper: ?? ??? ??? “std” [C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\canvas.vcxproj] npm ERR! c:\program files\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.16.27023\include\map(20): note: ?. ??? “std” npm ERR! Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102’ (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.6 npm ERR! node-pre-gyp info using node@17.6.0 | win32 | ia32 npm ERR! node-pre-gyp info check checked for “C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\Release\canvas.node” (not found) npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.9.0/canvas-v2.9.0-node-v102-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.0/canvas-v2.9.0-node-v102-win32-unknown-ia32.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.9.0 and node@17.6.0 (node-v102 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.0/canvas-v2.9.0-node-v102-win32-unknown-ia32.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.4.1 npm ERR! gyp info using node@17.6.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@8.4.1 npm ERR! gyp info using node@17.6.0 | win32 | ia32 npm ERR! gyp info find Python using Python version 3.9.0 found at “C:\Users\Ольга\AppData\Local\Programs\Python\Python39-32\python.exe” npm ERR! gyp info find VS using VS2017 (15.9.28307.1800) found at: npm ERR! gyp info find VS “C:\Program Files\Microsoft Visual Studio\2017\BuildTools” npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Users\Ольга\AppData\Local\Programs\Python\Python39-32\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args ‘C:\Program Files\nodejs\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:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\config.gypi’, npm ERR! gyp info spawn args ‘-I’, npm ERR! gyp info spawn args ‘C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi’, npm ERR! gyp info spawn args ‘-I’, npm ERR! gyp info spawn args ‘C:\Users\Ольга\AppData\Local\node-gyp\Cache\17.6.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\Ольга\AppData\Local\node-gyp\Cache\17.6.0’, npm ERR! gyp info spawn args ‘-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp’, npm ERR! gyp info spawn args ‘-Dnode_lib_file=C:\\Users\\Ольга\\AppData\\Local\\node-gyp\\Cache\\17.6.0\\<(target_arch)\\node.lib’, npm ERR! gyp info spawn args ‘-Dmodule_root_dir=C:\hashlips_art_engine-1.1.2_patch_v6\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:\hashlips_art_engine-1.1.2_patch_v6\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@8.4.1 npm ERR! gyp info using node@17.6.0 | win32 | ia32 npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\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\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194: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 6.3.9600 npm ERR! gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “build” “–fallback-to-build” “–module=C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\Release\canvas.node” “–module_name=canvas” “–module_path=C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\Release” “–napi_version=8” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v102” npm ERR! gyp ERR! cwd C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas npm ERR! gyp ERR! node -v v17.6.0 npm ERR! gyp ERR! node-gyp -v v8.4.1 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\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102’ (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\hashlips_art_engine-1.1.2_patch_v6\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:1090: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 6.3.9600 npm ERR! node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build” npm ERR! node-pre-gyp ERR! cwd C:\hashlips_art_engine-1.1.2_patch_v6\node_modules\canvas npm ERR! node-pre-gyp ERR! node -v v17.6.0 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.6 npm ERR! node-pre-gyp ERR! not ok

I don’t know what to do, please help

About this issue

Most upvoted comments

@chek4lovv you could try changing the canvas version to 2.9.0.

In package.json ~line 27: https://github.com/HashLips/hashlips_art_engine/blob/d8ee279043d2d4a8de3bdfac0d89d0e966fb04a2/package.json#L26-L28

Change "canvas": "^2.8.0", to "canvas": "^2.9.0",.