node-gfx / node-canvas-prebuilt

Repo used to build binaries for node-canvas on CI
169 stars 31 forks source link

M1 chip issue? #125

Open lextoc opened 3 years ago

lextoc commented 3 years ago

I'm getting an error that I think is related to the new M1 chip in the MacBooks...

https://github.com/sindresorhus/get-port-cli/issues/7#event-5225761760


npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

> canvas@2.6.1 install /Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v83-darwin-unknown-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for canvas@2.6.1 and node@14.17.5 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
Package pixman-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pixman-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pixman-1' found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 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 (/Users/alexanderclaes/.nvm/versions/node/v14.17.5/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/Users/alexanderclaes/.nvm/versions/node/v14.17.5/bin/node" "/Users/alexanderclaes/.nvm/versions/node/v14.17.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas
gyp ERR! node -v v14.17.5
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 '/Users/alexanderclaes/.nvm/versions/node/v14.17.5/bin/node /Users/alexanderclaes/.nvm/versions/node/v14.17.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/alexanderclaes/zapfloorhq/operator-client/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> (/Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400: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 Darwin 20.3.0
node-pre-gyp ERR! command "/Users/alexanderclaes/.nvm/versions/node/v14.17.5/bin/node" "/Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas
node-pre-gyp ERR! node -v v14.17.5
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/alexanderclaes/.nvm/versions/node/v14.17.5/bin/node /Users/alexanderclaes/.nvm/versions/node/v14.17.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/alexanderclaes/zapfloorhq/operator-client/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)

> chromedriver@2.34.1 install /Users/alexanderclaes/zapfloorhq/operator-client/node_modules/chromedriver
> node install.js

Only Mac 64 bits supported.
npm WARN eslint-plugin-vue@6.2.2 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN file-loader@1.1.6 requires a peer of webpack@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN linkifyjs@2.1.9 requires a peer of react@>= 0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN linkifyjs@2.1.9 requires a peer of react-dom@>= 0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN prosemirror-utils@0.9.6 requires a peer of prosemirror-tables@^0.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN vue-ckeditor2@1.26.0 requires a peer of ckeditor@>= 4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@2.6.1 (node_modules/canvas):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.34.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.34.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alexanderclaes/.npm/_logs/2021-08-30T06_22_33_447Z-debug.log```
v11 commented 2 years ago

I have this too!

jcart commented 2 years ago

Running into this issue as well. Any updates?

v11 commented 2 years ago

Maybe related, but i am not using node-canvas-prebuilt: https://stackoverflow.com/questions/71134774/deploy-firebase-cloud-function-with-node-canvas-fails-on-mac-m1/71190377#71190377

tiagosalema commented 1 year ago

+1