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

Canvas cannot be installed on openwrt #1854

Closed
ITdesk01 opened this issue Jul 13, 2021 · 2 comments
Closed

Canvas cannot be installed on openwrt #1854

ITdesk01 opened this issue Jul 13, 2021 · 2 comments

Comments

@ITdesk01
Copy link

ITdesk01 commented Jul 13, 2021

root@OpenWrt:~# npm install canvas
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm http fetch GET 304 https://registry.npmjs.org/canvas 895ms (from cache)
npm timing stage:loadCurrentTree Completed in 954ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
npm http fetch GET 304 https://registry.npmjs.org/nan 247ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/simple-get 612ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/@mapbox%2fnode-pre-gyp 3501ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/npmlog 47ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/https-proxy-agent 278ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/make-dir 279ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/detect-libc 286ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/semver 646ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/node-fetch 656ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/nopt 659ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/tar 657ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/rimraf 778ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/agent-base 239ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/debug 243ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/ms 226ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/abbrev 225ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/are-we-there-yet 282ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/set-blocking 281ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/gauge 288ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/console-control-strings 294ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/readable-stream 242ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/delegates 253ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/core-util-is 318ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/inherits 320ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/process-nextick-args 321ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/string_decoder 320ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/isarray 324ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/safe-buffer 322ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/util-deprecate 325ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/aproba 18ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/string-width 277ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/object-assign 279ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/wide-align 281ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/strip-ansi 282ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/has-unicode 285ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/signal-exit 287ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-fullwidth-code-point 242ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/code-point-at 255ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/number-is-nan 229ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/ansi-regex 231ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/glob 218ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/fs.realpath 287ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/once 286ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/inflight 290ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/minimatch 290ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/path-is-absolute 292ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/wrappy 221ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/brace-expansion 222ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/balanced-match 233ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/concat-map 235ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/lru-cache 214ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/yallist 216ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/chownr 270ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/fs-minipass 276ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/minipass 276ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/mkdirp 276ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/minizlib 282ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/simple-concat 233ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/decompress-response 238ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/mimic-response 217ms (from cache)
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 9559ms
npm timing stage:loadIdealTree Completed in 9628ms
npm timing stage:generateActionsToTake Completed in 18ms
npm timing action:extract Completed in 387ms
npm timing action:finalize Completed in 59ms
npm timing audit submit Completed in 610ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 610ms
npm timing audit body Completed in 1ms
npm timing action:refresh-package-json Completed in 178ms
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle @mapbox/[email protected]~preinstall: @mapbox/[email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing action:preinstall Completed in 15ms
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff @mapbox/[email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm timing action:build Completed in 36ms
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle @mapbox/[email protected]~install: @mapbox/[email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]

> [email protected] install /root/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | linux | x64
node-pre-gyp info check checked for "/root/node_modules/canvas/build/Release/canvas.node" (not found)
node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-musl-x64.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-musl-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v83 ABI, musl) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-musl-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.9.5 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/root/node_modules/canvas/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/14.17.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/14.17.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/14.17.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/root/node_modules/canvas',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
/bin/sh: pkg-config: not found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.10.43
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/root/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/root/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /root/node_modules/canvas
gyp ERR! node -v v14.17.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/root/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 5.10.43
node-pre-gyp ERR! command "/usr/bin/node" "/root/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/node_modules/canvas
node-pre-gyp ERR! node -v v14.17.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.5
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/root/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm info lifecycle [email protected]~install: Failed to exec install script
npm timing action:install Completed in 3319ms
npm timing stage:rollbackFailedOptional Completed in 106ms
npm timing stage:runTopLevelLifecycles Completed in 14794ms
npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm timing npm Completed in 15327ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-07-13T09_31_22_808Z-debug.log
@ITdesk01
Copy link
Author

Please adapt to openwrt, thank you

@zbjornson
Copy link
Collaborator

Prebuilds aren't available for msul libc. More info in the troubleshooting guide:

If you're on Alpine Linux or another distro using musl-libc

The log may look like

node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.0/canvas-v2.6.0-node-v64-linux-musl-x64.tar.gz

Prebuilds are only available for glibc, not musl-libc. See node-gfx/node-canvas-prebuilt#77, which includes information on building from source.

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

No branches or pull requests

2 participants