I am behind proxy and tried to run:
sudo npm install -g sqlite3
This resulted following errors:
> [email protected] install /usr/local/lib/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v48-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/xliu/.node-gyp/6.9.4"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT 104.20.23.46:443
gyp ERR! stack at Object.exports._errnoException (util.js:1022:11)
gyp ERR! stack at exports._exceptionWithHostPort (util.js:1045:20)
gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
gyp ERR! System Darwin 16.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-darwin-x64"
gyp ERR! cwd /usr/local/lib/node_modules/sqlite3
gyp ERR! node -v v6.9.4
gyp ERR! node-gyp -v v3.4.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 configure --fallback-to-build --module=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Darwin 16.4.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/sqlite3
node-pre-gyp ERR! node -v v6.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
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 configure --fallback-to-build --module=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-darwin-x64' (1)
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "sqlite3"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/xliu/Desktop/npm-debug.log
Anybody have idea how to fix this?
This Problem is solved by setting npm config set proxy <your proxy>.
Most helpful comment
This Problem is solved by setting
npm config set proxy <your proxy>.