2

Sqlite3 failed to install in nodejs

tried build from source as well , still not luck

[email protected] install .../node_modules/sqlite3 node-pre-gyp install --fallback-to-build

/usr/bin/env: node: No such file or directory
npm WARN [email protected] No repository field.

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Subburaj
  • 5,114
  • 10
  • 44
  • 87
Praveen V
  • 37
  • 1
  • 7

2 Answers2

3

Try running the command after cleaning the npm cache

npm cache clean

If cleaning cache didn't work , upgrade your npm

 npm install -g npm

If there is any permission issue on upgrading add sudo

 sudo  npm install -g npm

reinstall node-gyp

npm install  -g node-gyp

finally, install sqlite3

npm install --save sqlite3
ArUn
  • 1,317
  • 2
  • 23
  • 39
2

install [email protected] instead.

I discovered this while following the issue https://github.com/mapbox/node-sqlite3/issues/1246#issuecomment-561942175