0
votes

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.
2
Any suggestions or help would be much appreciatedPraveen V
Possible duplicate of Error installing sqlite3 in node.jsDavid R

2 Answers

0
votes

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