pouchdb / pouchdb-server

CouchDB-compatible server built on PouchDB and Node
Apache License 2.0
948 stars 154 forks source link

npm install broken on ubuntu #410

Open sundaywork opened 5 years ago

sundaywork commented 5 years ago

On a clean ubuntu server, installed node v12.8.1, then npm install -g pouchdb-server then failed at the following errors:

node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v72-linux-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@12.8.1 (node-v72 ABI) (falling back to source compile with node-gyp) gyp WARN EACCES user "nobody" does not have permission to access the dev dir "/root/.cache/node-gyp/12.8.1" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/pouchdb-server/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: EACCES: permission denied, mkdir '/usr/lib/node_modules/pouchdb-server/node_modules/sqlite3/.node-gyp' gyp ERR! System Linux 5.0.0-15-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/pouchdb-server/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/lib/node_modules/pouchdb-server/node_modules/sqlite3/lib/binding/node-v72-linux-x64" gyp ERR! cwd /usr/lib/node_modules/pouchdb-server/node_modules/sqlite3 gyp ERR! node -v v12.8.1 gyp ERR! node-gyp -v v5.0.3 gyp ERR! not ok

Tried on several servers.

sundaywork commented 5 years ago

WeChat Screenshot_20190819142051 Still the case for today.