RangerMauve / dat-store

A CLI tool for backing up hyperdrive datasets
GNU Affero General Public License v3.0
59 stars 14 forks source link

Unable to install dat-store with npm #39

Closed ElonSatoshi closed 4 years ago

ElonSatoshi commented 4 years ago

This is what happens when I try to install it:

% sudo npm install -g dat-store
/usr/local/bin/dat-store -> /usr/local/lib/node_modules/dat-store/bin.js

> fd-lock@1.0.2 install /usr/local/lib/node_modules/dat-store/node_modules/fd-lock
> node-gyp-build

> sodium-native@2.4.6 install /usr/local/lib/node_modules/dat-store/node_modules/sodium-native
> node-gyp-build "node preinstall.js" "node postinstall.js"

> utp-native@1.7.3 install /usr/local/lib/node_modules/dat-store/node_modules/utp-native
> node-gyp-build

> os-service@2.1.3 install /usr/local/lib/node_modules/dat-store/node_modules/os-service
> node-gyp rebuild

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/10.15.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/dat-store/node_modules/os-service/.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/local/lib/node_modules/dat-store/node_modules/os-service/.node-gyp'
gyp ERR! System Linux 4.19.0-6-amd64
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/dat-store/node_modules/os-service
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! os-service@2.1.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the os-service@2.1.3 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!     /root/.npm/_logs/2019-11-14T01_04_46_654Z-debug.log

Operating system is Debian 10. What am I doing wrong here?

RangerMauve commented 4 years ago

I think this is a problem with NPM. Do any of the answers on this stackoverflow issue help? https://stackoverflow.com/questions/29468404/gyp-warn-eacces-user-root-does-not-have-permission-to-access-the-dev-dir

ElonSatoshi commented 4 years ago

Thank you! I installed the latest version of nodejs, learned how to use npm properly, and now I have dat-store running!