Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install redoc-cli globally #767

Closed
jooola opened this issue Jan 1, 2019 · 1 comment
Closed

Cannot install redoc-cli globally #767

jooola opened this issue Jan 1, 2019 · 1 comment

Comments

@jooola
Copy link

jooola commented Jan 1, 2019

I cannot install the redoc-cli tool without hitting a permission error, even when installing as root.

I don't know if this is specially related to redoc-cli but I can install other packages globally without any problem.

Here is what I tried to achieve (using root user or sudo gives the same result):

root@jofix:~# npm install -g redoc-cli --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli   '/usr/bin/npm',
npm verb cli   'install',
npm verb cli   '-g',
npm verb cli   'redoc-cli',
npm verb cli   '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session f45ebafef4f7b78f
npm http fetch GET 304 https://registry.npmjs.org/redoc-cli 150ms (from cache)
npm timing stage:loadCurrentTree Completed in 288ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms

[...]

npm http fetch GET 304 https://registry.npmjs.org/memoize-one 174ms (from cache)
npm timing stage:rollbackFailedOptional Completed in 0ms
npm timing stage:runTopLevelLifecycles Completed in 3332ms
npm verb stack Error: exited with error code: 128
npm verb stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js:12:19)
npm verb stack     at ChildProcess.emit (events.js:182:13)
npm verb stack     at maybeClose (internal/child_process.js:962:16)
npm verb stack     at Socket.stream.socket.on (internal/child_process.js:381:11)
npm verb stack     at Socket.emit (events.js:182:13)
npm verb stack     at Pipe._handle.close (net.js:610:12)
npm verb cwd /root
npm verb Linux 4.9.0-8-amd64
npm verb argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "redoc-cli" "--verbose"
npm verb node v10.15.0
npm verb npm  v6.4.1
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://github.com/markedjs/marked.git
npm ERR! 
npm ERR! fatal: failed to stat '.': Permission denied
npm ERR! 
npm ERR! exited with error code: 128
npm verb exit [ 1, true ]
npm timing npm Completed in 3998ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-01T20_22_17_353Z-debug.log
root@jofix:~# 

Or

jo@jofix:~$ sudo npm install -g --verbose redoc-cli
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli   '/usr/bin/npm',
npm verb cli   'install',
npm verb cli   '-g',
npm verb cli   '--verbose',
npm verb cli   'redoc-cli' ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session 96cbd68f088636de
npm http fetch GET 304 https://registry.npmjs.org/redoc-cli 175ms (from cache)
npm timing stage:loadCurrentTree Completed in 319ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms

[...]

npm http fetch GET 304 https://registry.npmjs.org/stickyfill 70ms (from cache)
npm timing stage:rollbackFailedOptional Completed in 0ms
npm timing stage:runTopLevelLifecycles Completed in 9468ms
npm verb stack Error: Command failed: /usr/bin/git submodule update -q --init --recursive
npm verb stack fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-7f37944e': Permission denied
npm verb stack 
npm verb stack     at ChildProcess.exithandler (child_process.js:294:12)
npm verb stack     at ChildProcess.emit (events.js:182:13)
npm verb stack     at maybeClose (internal/child_process.js:962:16)
npm verb stack     at Socket.stream.socket.on (internal/child_process.js:381:11)
npm verb stack     at Socket.emit (events.js:182:13)
npm verb stack     at Pipe._handle.close (net.js:610:12)
npm verb cwd /home/jo/go/src/gitlab.com/vtrack/vtrack-server
npm verb Linux 4.9.0-8-amd64
npm verb argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "--verbose" "redoc-cli"
npm verb node v10.15.0
npm verb npm  v6.4.1
npm ERR! code 128
npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursive
npm ERR! fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-7f37944e': Permission denied
npm ERR! 
npm verb exit [ 1, true ]
npm timing npm Completed in 9872ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-01T20_28_36_872Z-debug.log
@jooola
Copy link
Author

jooola commented Jan 1, 2019

This has something to do with npm permissions again, sorry to bother here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant