Unable to Install Ceramic CLI

Trying to install using npm install --location=global @ceramicnetwork/cli and its causing me issues.

npm ERR! code 1 npm ERR! path /opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3 npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build npm ERR! CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o npm ERR! LIBTOOL-STATIC Release/nothing.a npm ERR! Failed to execute '/opt/homebrew/Cellar/node@16/16.16.0/bin/node /opt/homebrew/Cellar/node@16/16.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@1.0.9 npm ERR! node-pre-gyp info using node@16.16.0 | darwin | arm64 npm ERR! node-pre-gyp info check checked for "/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64/node_sqlite3.node" (not found) npm ERR! node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.0.8/napi-v6-darwin-unknown-arm64.tar.gz npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/TryGhost/node-sqlite3/releases/download/v5.0.8/napi-v6-darwin-unknown-arm64.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for sqlite3@5.0.8 and node@16.16.0 (node-v93 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/TryGhost/node-sqlite3/releases/download/v5.0.8/napi-v6-darwin-unknown-arm64.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.16.0 | darwin | arm64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.16.0 | darwin | arm64 npm ERR! gyp info find Python using Python version 3.8.9 found at "/Library/Developer/CommandLineTools/usr/bin/python3" npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/opt/homebrew/Cellar/node@16/16.16.0/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 '/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/opt/homebrew/Cellar/node@16/16.16.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/philvanmeppelenscheppink/Library/Caches/node-gyp/16.16.0/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/philvanmeppelenscheppink/Library/Caches/node-gyp/16.16.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/Cellar/node@16/16.16.0/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/philvanmeppelenscheppink/Library/Caches/node-gyp/16.16.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3', 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 node-gyp@9.0.0 npm ERR! gyp info using node@16.16.0 | darwin | arm64 npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! /bin/sh: line 1: 30786 Killed: 9 ./gyp-mac-tool filter-libtool libtool -static -o Release/nothing.a Release/obj.target/nothing/node_modules/node-addon-api/nothing.o npm ERR! make: *** [Release/nothing.a] Error 137 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 (/opt/homebrew/Cellar/node@16/16.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Darwin 21.5.0 npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node@16/16.16.0/bin/node" "/opt/homebrew/Cellar/node@16/16.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6" npm ERR! gyp ERR! cwd /opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3 npm ERR! gyp ERR! node -v v16.16.0 npm ERR! gyp ERR! node-gyp -v v9.0.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 '/opt/homebrew/Cellar/node@16/16.16.0/bin/node /opt/homebrew/Cellar/node@16/16.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28) npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16) npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) npm ERR! node-pre-gyp ERR! System Darwin 21.5.0 npm ERR! node-pre-gyp ERR! command "/opt/homebrew/Cellar/node@16/16.16.0/bin/node" "/opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" npm ERR! node-pre-gyp ERR! cwd /opt/homebrew/lib/node_modules/@ceramicnetwork/cli/node_modules/sqlite3 npm ERR! node-pre-gyp ERR! node -v v16.16.0 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9 npm ERR! node-pre-gyp ERR! not ok

Have not seen this before. Could you please try installing sqlite3 via homebrew maybe? brew install sqlite

doesn’t work and I already had sqlite it seems. Its trying to use the sqlite from the node modules of the cli though. Maybe there is a version issue there?

“does not work” how?

I do not think the issue is with sqlite3 or npm package. I have M1 mac, and things are working okay, but I have python2 and sqlite3 from homebrew installed. My bet is something is wrong with these.

the same errors as before. I do not have python2 has it is removed in the latest Mac updates. It works fine for my coworkers but they also have python2 installed like you have. I suspect that python2 is required for the sqlite3 version in the sli maybe?

And, my hypothesis is it is also required for node-gyp, which is used by sqlite npm package.

I just installed python 2.7 and still no go. Same errors as before. I have node-gyp installed, sqlite3, node16, and python 2.7 now

also tried installing with different npm versions. npm 6 and 7 gets me a OS memory error

I have sqlite3 installed via brew, but when trying to install via npm its causing a similar issue to the one caused when installing ceramic. So it seems like a npm issue installing sqlite3 when installing ceramic

update. I have this working. It appears if I did npm install --location=global @ceramicnetwork/cli it worked but not npm install -g @ceramicnetwork/cli

1 Like