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.
2
  • Any suggestions or help would be much appreciated Commented Oct 10, 2019 at 6:59
  • 1
    Possible duplicate of Error installing sqlite3 in node.js Commented Oct 10, 2019 at 7:14

2 Answers 2

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
Sign up to request clarification or add additional context in comments.

Comments

2

install [email protected] instead.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.