Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialClint Oka
5,768 PointsI am having error when installing sqlite3
Using SQL ORMs with Node.js
this is the step I am stuck on:
npm install --save sqlite3@^4.0.9
this is the error I get:
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
any help will be much appreciated
2 Answers
Rohald van Merode
Treehouse StaffHi Clint Oka,
This is a warning and can be safely ignored while following the course 🙂
Rohald van Merode
Treehouse StaffHi Clint Oka,
I'm sorry you're still experiencing errors. Which OS / processor and node/npm versions do you have running? I've tried a bunch of different Node and npm versions trying to replicate the error and with that find a solution but whatever version I use things seem to be installing fine on my Intel based mac.
I've read quite a lot of issues happening with the m1 macs as well as with some node versions so you could try to update your node and try it again (this student seemed to have fixed it by using node 12.7.0) .
I hope this fixes things on your end 🙂
Clint Oka
5,768 Pointsthanks I tried nvm use 12.7.0, but it didn't install. I'm running a Chrome duet arm64. Any other ideas?
Clint Oka
5,768 PointsClint Oka
5,768 Pointsstill gets error
npm ERR! code 1 npm ERR! path /home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3 npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build npm ERR! make: Entering directory '/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/build' npm ERR! ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c npm ERR! make: Leaving directory '/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/build' npm ERR! Failed to execute '/usr/bin/node /usr/share/nodejs/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/lib/binding/node-v72-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0 npm ERR! node-pre-gyp info using node@12.22.5 | linux | arm64 npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download npm ERR! node-pre-gyp info check checked for "/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node" (not found) npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v72-linux-arm64.tar.gz npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v72-linux-arm64.tar.gz npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v72-linux-arm64.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@12.22.5 (node-v72 ABI, glibc) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v72-linux-arm64.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@12.22.5 | linux | arm64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@12.22.5 | linux | arm64 npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/share/nodejs/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 '/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/share/nodejs/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/include/nodejs/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=/usr/include/nodejs', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/okaclint/treeHouse/sql-orms-with-node/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@7.1.2 npm ERR! gyp info using node@12.22.5 | linux | arm64 npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! /bin/sh: 1: python: not found npm ERR! make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127 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 (/usr/share/nodejs/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:314:20) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) npm ERR! gyp ERR! System Linux 5.4.151-16908-gff376e5d5ee1 npm ERR! gyp ERR! command "/usr/bin/node" "/usr/share/nodejs/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/lib/binding/node-v72-linux-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72" npm ERR! gyp ERR! cwd /home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3 npm ERR! gyp ERR! node -v v12.22.5 npm ERR! gyp ERR! node-gyp -v v7.1.2 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 '/usr/bin/node /usr/share/nodejs/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3/lib/binding/node-v72-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/okaclint/treeHouse/sql-orms-with-node/node_modules/node-pre-gyp/lib/util/compile.js:83:29) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20) npm ERR! node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1022:16) npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) npm ERR! node-pre-gyp ERR! System Linux 5.4.151-16908-gff376e5d5ee1 npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/okaclint/treeHouse/sql-orms-with-node/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" npm ERR! node-pre-gyp ERR! cwd /home/okaclint/treeHouse/sql-orms-with-node/node_modules/sqlite3 npm ERR! node-pre-gyp ERR! node -v v12.22.5 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0 npm ERR! node-pre-gyp ERR! not oknpm ERR! A complete log of this run can be found in: npm ERR! /home/okaclint/.npm/_logs/2022-01-13T18_09_37_665Z-debug.log