Hi,
I’m trying to contribute to the project, but I’m encountering an issue during the setup.
I’m using a Mac with an M2 (arm64) processor, and I’m unable to install the project’s dependencies as outlined in the guide here: contributing guide. When I run the “npm ci” command, I receive an error message indicating that the build of argon2 failed because it’s not supported by the arm64 architecture (at least, that’s what I believe the error message is saying).
Do you have any suggestions on how to resolve this issue so I can start working on this project?
Thanks,
Jules
This is my error message if needed :
npm ERR! code 1
npm ERR! path /path_to_project/clients/node_modules/argon2
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/ref.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/core.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/thread.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
npm ERR! LIBTOOL-STATIC Release/argon2.a
npm ERR! CXX(target) Release/obj.target/argon2/argon2_node.o
npm ERR! Failed to execute ‘/Users/jules/.nvm/versions/node/v18.18.2/bin/node /Users/jules/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/path_to_project/clients/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/path_to_project/clients/node_modules/argon2/lib/binding/napi-v3 --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3’ (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | arm64
npm ERR! node-pre-gyp info check checked for “/path_to_project/clients/node_modules/argon2/lib/binding/napi-v3/argon2.node” (not found)
npm ERR! node-pre-gyp http GET https://github.com/ranisalt/node-argon2/releases/download/v0.31.0/argon2-v0.31.0-napi-v3-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.31.0/argon2-v0.31.0-napi-v3-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 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/ranisalt/node-argon2/releases/download/v0.31.0/argon2-v0.31.0-napi-v3-darwin-arm64-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.5 found at “/opt/homebrew/opt/[email protected]/bin/python3.11”
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args ‘/Users/jules/.nvm/versions/node/v18.18.2/lib/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 ‘make’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/path_to_project/clients/node_modules/argon2/build/config.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/Users/jules/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp/addon.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/Users/jules/Library/Caches/node-gyp/18.18.2/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=/Users/jules/Library/Caches/node-gyp/18.18.2’,
npm ERR! gyp info spawn args ‘-Dnode_gyp_dir=/Users/jules/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp’,
npm ERR! gyp info spawn args ‘-Dnode_lib_file=/Users/jules/Library/Caches/node-gyp/18.18.2/<(target_arch)/node.lib’,
npm ERR! gyp info spawn args ‘-Dmodule_root_dir=/path_to_project/clients/node_modules/argon2’,
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 ‘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 [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
npm ERR! c++: error: this compiler does not support arm64
npm ERR! c++: error: unrecognized command line option ‘-stdlib=libc++’
npm ERR! make: *** [Release/obj.target/argon2/argon2_node.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make
failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/jules/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12)
npm ERR! gyp ERR! System Darwin 23.0.0
npm ERR! gyp ERR! command “/Users/jules/.nvm/versions/node/v18.18.2/bin/node” “/Users/jules/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–module=/path_to_project/clients/node_modules/argon2/lib/binding/napi-v3/argon2.node” “–module_name=argon2” “–module_path=/path_to_project/clients/node_modules/argon2/lib/binding/napi-v3” “–napi_version=9” “–node_abi_napi=napi” “–napi_build_version=3” “–node_napi_label=napi-v3”
npm ERR! gyp ERR! cwd /path_to_project/clients/node_modules/argon2
npm ERR! gyp ERR! node -v v18.18.2
npm ERR! gyp ERR! node-gyp -v v9.4.0
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 ‘/Users/jules/.nvm/versions/node/v18.18.2/bin/node /Users/jules/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/path_to_project/clients/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/path_to_project/clients/node_modules/argon2/lib/binding/napi-v3 --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3’ (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/path_to_project/clients/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:517:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1098:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:303:5)
npm ERR! node-pre-gyp ERR! System Darwin 23.0.0
npm ERR! node-pre-gyp ERR! command “/Users/jules/.nvm/versions/node/v18.18.2/bin/node” “/path_to_project/clients/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build”
npm ERR! node-pre-gyp ERR! cwd /path_to_project/clients/node_modules/argon2
npm ERR! node-pre-gyp ERR! node -v v18.18.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in: /Users/jules/.npm/_logs/2023-11-07T21_33_26_988Z-debug-0.log