每次我尝试在我的mac中安装sqlite3时,都会收到此错误:
sh: node-pre-gyp: command not found
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/luis/.npm/_logs/2018-03-09T09_16_15_084Z-debug.log
解决方案对我有用,我已经通过单独运行npm cache clean --force
和npm install sqlite3 --build-from-source --unsafe-perm
命令解决了。
由于https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.11/node-v59-win32-x64.tar.gz上的授权错误,通常会发生此问题
希望能为你效劳。