Gold Medal Metrics - npm install failed

Hey!
I was about to make the Gold Medal Metrics project, but when I run “npm install”, even with --force, it ends up throwing millions of errors, the first one being :

npm ERR! code 1
npm ERR! path /Users/antoni/Downloads/project-5-gold-medal-metrics-start/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c – node-pre-gyp install --fallback-to-build
npm ERR! ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
npm ERR! Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/antoni/Downloads/project-5-gold-medal-metrics-start/node_modules/sqlite3/lib/binding/node-v108-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/antoni/Downloads/project-5-gold-medal-metrics-start/node_modules/sqlite3/lib/binding/node-v108-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108’ (1)

Generally it fails and I cannot go on with the project, cause the node_modules folder does not show up. I use macOS v.12.6.3 and WebStorm IDE.

Help me! :frowning:

It seems like there might be a problem with the installation of the sqlite3 package. Here are a few things you could try:

  1. Delete the node_modules folder and run npm install again.

  2. Update npm to the latest version by running npm install -g npm.

  3. Check if your system meets the requirements to install the sqlite3 package. According to the package documentation, the sqlite3 package requires node version 8.x or greater and a C++11 compatible compiler. You may need to install additional dependencies on your system to satisfy these requirements.

  4. Try installing sqlite3 separately using npm install sqlite3 and see if that works. Then, try running npm install again in your main project directory.

If none of the above solutions work, please provide more details about the errors you are receiving so that I can provide more help.

Hey! I managed to solve the problem, and the fun fact is, I had to install [email protected] I don’t know why, but in spite of having actual version of node, it tried installing old versions of sqlite. But thank you for reply!

1 Like