Monday 30 March 2020

I'm trying to install node-gd via npm, but I get nothing but errors.

I'm trying to install node-gd on Raspbian via npm. When I try to run sudo npm install -g node-gd, I get this error:gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/12.16.1" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/node-gd/.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/node-gd/.node-gyp' gyp ERR! System Linux 4.19.97-v7+ gyp ERR! command "/usr/local/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/node-gd gyp ERR! node -v v12.16.1 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-gd@2.0.0 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-gd@2.0.0 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/2020-03-30T18_33_16_519Z-debug.log I made sure I had node-gyp installed by running sudo npm install -g node-gyp. I also tried the above command with --unsafe-perms. I also tried doing the answer here: https://stackoverflow.com/questions/42308879/npm-err-code-elifecycle. Still no luck. Any help?

Submitted March 30, 2020 at 07:47PM by RocketJumpingOtter

No comments:

Post a Comment