app-generator / api-server-nodejs

Nodejs API Server - Express / SQLite / TypeORM | AppSeed
https://appseed.us/boilerplate-code/nodejs-starter/
Other
227 stars 87 forks source link

Error when installing modules #3

Closed ali-h2010 closed 3 years ago

ali-h2010 commented 4 years ago

I am getting many errors when i call npm i I just downloaded the repo and run the command. Please update me if you require any log or other info.

37 warnings and 13 errors generated.
make:  [Release/obj.target/node_sqlite3/src/database.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/sqlite3/lib/binding/node-v72-darwin-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/sqlite3
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: 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/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 19.4.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.16.2
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok 
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/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/alkhamisah/Documents/Projects/NodeJSProjects/Apify/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN backend@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.0.6 install: "node-pre-gyp install --fallback-to-build"
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@4.0.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alkhamisah/.npm/_logs/2020-04-25T20_16_58_237Z-debug.log
morph1904 commented 4 years ago

I upgrade the dependency for sqlite3 to 4.2.0 and installed it manually first, though I am on windows.

arhmnsh commented 4 years ago

I've used Node v10 using nvm, and it worked.

app-generator commented 3 years ago

Hello @ali-h2010,

Please update, this issue should not be visible anymore. Tested: