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

Got multiple errors when install #27

Open
LucaSorvillo opened this issue Dec 10, 2024 · 3 comments
Open

Got multiple errors when install #27

LucaSorvillo opened this issue Dec 10, 2024 · 3 comments

Comments

@LucaSorvillo
Copy link

LucaSorvillo commented Dec 10, 2024

Node version: v22.11.0
OS: Windows 11
Command: npm i scribe.js-ocr
Log:

npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This package is no longer supported.
npm error code 1
npm error path C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --update-binary
npm error Warning: Missing input files:
npm error C:\GTK\bin\libpng14-14.dll
npm error C:\GTK\bin\libcairo-2.dll
npm error C:\GTK\bin\libfontconfig-1.dll
npm error C:\GTK\bin\libgobject-2.0-0.dll
npm error C:\GTK\bin\zlib1.dll
npm error C:\GTK\bin\libglib-2.0-0.dll
npm error C:\GTK\bin\libgthread-2.0-0.dll
npm error C:\GTK\bin\libfreetype-6.dll
npm error C:\GTK\bin\libgmodule-2.0-0.dll
npm error C:\GTK\bin\libpangocairo-1.0-0.dll
npm error C:\GTK\bin\libpango-1.0-0.dll
npm error C:\GTK\bin\libpangoft2-1.0-0.dll
npm error C:\GTK\bin\libpangowin32-1.0-0.dll
npm error C:\GTK\bin\libintl-8.dll
npm error C:\GTK\bin\libexpat-1.dll
npm error
npm error   Backend.cc
npm error C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas\src\backend\Backend.h(3,10): error C1083: Non è possibile aprire il file inclusione: 'cairo.h': No such file or directory [C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas\build\canvas.vcxproj]
npm error   (compilazione del file di origine '../src/backend/Backend.cc')
npm error
npm 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 --update-binary --module=C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v127' (1)
npm error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using [email protected]
npm error node-pre-gyp info using [email protected] | win32 | x64
npm error (node:43280) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
npm error (Use `node --trace-deprecation ...` to show where the warning was created)
npm error node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v127-win32-unknown-x64.tar.gz
npm error node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v127-win32-unknown-x64.tar.gz
npm error node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v127 ABI, unknown) (falling back to source compile with node-gyp)
npm error node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v127-win32-unknown-x64.tar.gz
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info ok
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info find Python using Python version 3.9.13 found at "C:\Users\PC\.pyenv\pyenv-win\versions\3.9.13\python3.exe"
npm error gyp info find VS using VS2022 (17.12.35527.113) found at:
npm error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"
npm error gyp info find VS run with --verbose for detailed information
npm error gyp info spawn C:\Users\PC\.pyenv\pyenv-win\versions\3.9.13\python3.exe
npm error gyp info spawn args [
npm error gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'msvs',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Users\\PC\\Desktop\\Progetto Captcha\\project-pdf\\node_modules\\canvas\\build\\config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Users\\PC\\AppData\\Local\\node-gyp\\Cache\\22.11.0\\include\\node\\common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=C:\\Users\\PC\\AppData\\Local\\node-gyp\\Cache\\22.11.0',
npm error gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\PC\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.11.0\\\\<(target_arch)\\\\node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=C:\\Users\\PC\\Desktop\\Progetto Captcha\\project-pdf\\node_modules\\canvas',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'C:\\Users\\PC\\Desktop\\Progetto Captcha\\project-pdf\\node_modules\\canvas\\build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info ok
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe
npm error gyp info spawn args [
npm error gyp info spawn args 'build\\binding.sln',
npm error gyp info spawn args '/clp:Verbosity=minimal',
npm error gyp info spawn args '/nologo',
npm error gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm error gyp info spawn args ]
npm error gyp ERR! build error
npm error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:216:23)
npm error gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm error gyp ERR! System Windows_NT 10.0.22631
npm error 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" "--update-binary" "--module=C:\\Users\\PC\\Desktop\\Progetto Captcha\\project-pdf\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=C:\\Users\\PC\\Desktop\\Progetto Captcha\\project-pdf\\node_modules\\canvas\\build\\Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v127"
npm error gyp ERR! cwd C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas
npm error gyp ERR! node -v v22.11.0
npm error gyp ERR! node-gyp -v v10.2.0
npm error gyp ERR! not ok
npm error node-pre-gyp ERR! build error
npm error 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 --update-binary --module=C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v127' (1)
npm error node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm error node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
npm error node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1104:16)
npm error node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm error node-pre-gyp ERR! System Windows_NT 10.0.22631
npm error node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\PC\\Desktop\\Progetto Captcha\\project-pdf\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm error node-pre-gyp ERR! cwd C:\Users\PC\Desktop\Progetto Captcha\project-pdf\node_modules\canvas
npm error node-pre-gyp ERR! node -v v22.11.0
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
npm error A complete log of this run can be found in: C:\Users\PC\AppData\Local\npm-cache\_logs\2024-12-10T17_18_45_700Z-debug-0.log
@Balearica
Copy link
Contributor

Thanks for reporting. This appears to be specific to using Node.js v22 on Windows, as I could replicate using v22 but not v18 or v20. Will investigate further.

Please note that Scribe.js currently does not support running recognition in Node.js for Windows for any Node.js version (see #9). Therefore, patching this issue will only make Scribe.js usable for Windows users using npm as a package manager and deploying to browser. Windows users looking to run recognition using Node.js should look into WSL2 until #9 is resolved.

@Balearica
Copy link
Contributor

This appears to be a bug we inherit from node-canvas. Interestingly, other users indicate it may also impact Node.js v22 on Linux, although I did not personally experience that when testing. Will think about how to resolve.

Automattic/node-canvas#2448

@bbreunig
Copy link

bbreunig commented Dec 13, 2024

Got the same Error on MacOS 15.1.1 (Intel)
Node version: v23.4.0
NPM version: 10.9.2

npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This package is no longer supported.
npm error code 1
npm error path /Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas
npm error command failed
npm error command sh -c node-pre-gyp install --fallback-to-build --update-binary
npm error Failed to execute '/usr/local/Cellar/node/23.4.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v131' (1)
npm error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using [email protected]
npm error node-pre-gyp info using [email protected] | darwin | x64
npm error (node:14728) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
npm error (Use `node --trace-deprecation ...` to show where the warning was created)
npm error node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v131-darwin-unknown-x64.tar.gz
npm error node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v131-darwin-unknown-x64.tar.gz 
npm error node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v131 ABI, unknown) (falling back to source compile with node-gyp) 
npm error node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v131-darwin-unknown-x64.tar.gz 
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | x64
npm error gyp info ok 
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | x64
npm error gyp info find Python using Python version 3.12.7 found at "/usr/local/anaconda3/bin/python3"
npm error gyp info spawn /usr/local/anaconda3/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/bikyc/Library/Caches/node-gyp/23.4.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/Users/bikyc/Library/Caches/node-gyp/23.4.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/Users/bikyc/Library/Caches/node-gyp/23.4.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error /bin/sh: pkg-config: command not found
npm error gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm error gyp ERR! configure error 
npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:317:18)
npm error gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error gyp ERR! System Darwin 24.1.0
npm error gyp ERR! command "/usr/local/Cellar/node/23.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v131"
npm error gyp ERR! cwd /Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas
npm error gyp ERR! node -v v23.4.0
npm error gyp ERR! node-gyp -v v11.0.0
npm error gyp ERR! not ok 
npm error node-pre-gyp ERR! build error 
npm error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/23.4.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v131' (1)
npm error node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm error node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm error node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1101:16)
npm error node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error node-pre-gyp ERR! System Darwin 24.1.0
npm error node-pre-gyp ERR! command "/usr/local/Cellar/node/23.4.0/bin/node" "/Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm error node-pre-gyp ERR! cwd /Users/bikyc/Nextcloud/Arbeit/mmt/healthclaim/node_modules/canvas
npm error node-pre-gyp ERR! node -v v23.4.0
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
npm error A complete log of this run can be found in: /Users/bikyc/.npm/_logs/2024-12-13T10_32_39_599Z-debug-0.log

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

No branches or pull requests

3 participants