Closed vivekvag closed 2 weeks ago
and brew list
==> Formulae ca-certificates giflib kubectx libxau mpdecimal python-setuptools zstd cairo glib kubernetes-cli libxcb openssl@3 python@3.13 fontconfig graphite2 libpng libxdmcp pango readline freetype harfbuzz librsvg libxext pcre2 sqlite fribidi icu4c@76 libtiff libxrender pixman thefuck gdk-pixbuf jpeg libunistring lz4 pkg-config xorgproto gettext jpeg-turbo libx11 lzo python-packaging xz
This seems to have fixed it for me:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
Awesome!!! Thanks for sharing, yes it worked for me too.
Recently, I upgraded to macOS 15.1 and while doing npm install canvas getting the below error. Node version: 18.20.4 canvas version: 2.9.0
Error message: npm install canvas npm warn deprecated inflight@1.0.6: 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 package.json@2.0.1: Use pkg.json instead. npm warn deprecated npmlog@5.0.1: This package is no longer supported. npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported. npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm warn deprecated gauge@3.0.2: This package is no longer supported. npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. npm error code 1 npm error path /Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas npm error command failed npm error command sh -c node-pre-gyp install --fallback-to-build --update-binary npm error SOLINK_MODULE(target) Release/canvas-postbuild.node npm error CXX(target) Release/obj.target/canvas/src/backend/Backend.o npm error Failed to execute '/Users/vivekgupta/.nvm/versions/node/v18.20.4/bin/node /Users/vivekgupta/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --update-binary --module=/Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1) npm error node-pre-gyp info it worked if it ends with ok npm error node-pre-gyp info using node-pre-gyp@1.0.11 npm error node-pre-gyp info using node@18.20.4 | darwin | arm64 npm error node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v108-darwin-unknown-arm64.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-v108-darwin-unknown-arm64.tar.gz npm error node-pre-gyp WARN Pre-built binaries not installable for canvas@2.11.2 and node@18.20.4 (node-v108 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-v108-darwin-unknown-arm64.tar.gz npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.1.0 npm error gyp info using node@18.20.4 | darwin | arm64 npm error gyp info ok npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.1.0 npm error gyp info using node@18.20.4 | darwin | arm64 npm error gyp info find Python using Python version 3.13.0 found at "/opt/homebrew/opt/python@3.13/bin/python3.13" npm error gyp info spawn /opt/homebrew/opt/python@3.13/bin/python3.13 npm error gyp info spawn args [ npm error gyp info spawn args '/Users/vivekgupta/.nvm/versions/node/v18.20.4/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/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas/build/config.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/vivekgupta/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/vivekgupta/Library/Caches/node-gyp/18.20.4/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/vivekgupta/Library/Caches/node-gyp/18.20.4', npm error gyp info spawn args '-Dnode_gyp_dir=/Users/vivekgupta/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/node-gyp', npm error gyp info spawn args '-Dnode_lib_file=/Users/vivekgupta/Library/Caches/node-gyp/18.20.4/<(target_arch)/node.lib', npm error gyp info spawn args '-Dmodule_root_dir=/Users/vivekgupta/Documents/FYND/hufflepuff/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 gyp info ok npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.1.0 npm error gyp info using node@18.20.4 | darwin | arm64 npm error gyp info spawn make npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm error In file included from ../src/backend/Backend.cc:1: npm error ../src/backend/Backend.h:5:10: fatal error: 'exception' file not found npm error 5 | #include
npm error | ^ (/Users/vivekgupta/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm error gyp ERR! System Darwin 24.1.0
npm error gyp ERR! command "/Users/vivekgupta/.nvm/versions/node/v18.20.4/bin/node" "/Users/vivekgupta/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--update-binary" "--module=/Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm error gyp ERR! cwd /Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas
npm error gyp ERR! node -v v18.20.4
npm error gyp ERR! node-gyp -v v10.1.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 '/Users/vivekgupta/.nvm/versions/node/v18.20.4/bin/node /Users/vivekgupta/.nvm/versions/node/v18.20.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --update-binary --module=/Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm error node-pre-gyp ERR! stack at ChildProcess. (/Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:517:28)
npm error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1098:16)
npm error node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:303:5)
npm error node-pre-gyp ERR! System Darwin 24.1.0
npm error node-pre-gyp ERR! command "/Users/vivekgupta/.nvm/versions/node/v18.20.4/bin/node" "/Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm error node-pre-gyp ERR! cwd /Users/vivekgupta/Documents/FYND/hufflepuff/node_modules/canvas
npm error node-pre-gyp ERR! node -v v18.20.4
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
~~npm error 1 error generated. npm error make: *** [Release/obj.target/canvas/src/backend/Backend.o] Error 1 npm error gyp ERR! build error npm error gyp ERR! stack Error:make
failed with exit code: 2 npm error gyp ERR! stack at ChildProcess.