danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 480 forks source link

unable to install in nvm #374

Closed toknT closed 2 years ago

toknT commented 2 years ago

It return permission error, but I'm using sudo

$ nvm -v
0.39.0
$ node -v
v14.18.1
$ sudo npm install -g aglio

> node-gyp rebuild

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.18.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/aglio/node_modules/protagonist/.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/aglio/node_modules/protagonist/.node-gyp'
gyp ERR! System Linux 5.10.60.1-microsoft-standard-WSL2
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/aglio/node_modules/protagonist
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! aglio-theme-olio@1.6.3 postinstall: `node scripts/setup-cache.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the aglio-theme-olio@1.6.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
toknT commented 2 years ago

sorry not solved the problem , https://github.com/danielgtaylor/aglio/issues/352#issuecomment-387715105