Navigation Menu

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

Install error on Ubuntu 16.04 #9

Open
ostriandoni opened this issue Jun 23, 2018 · 1 comment
Open

Install error on Ubuntu 16.04 #9

ostriandoni opened this issue Jun 23, 2018 · 1 comment

Comments

@ostriandoni
Copy link

What I type?

$ sudo npm install -g swagger-spec-to-pdf

What I get?

> swagger-spec-to-pdf@1.0.8 preinstall /usr/local/lib/node_modules/swagger-spec-to-pdf
> npm i -g http-server

npm ERR! path /usr/local/bin/http-server
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink
npm ERR! Error: EACCES: permission denied, unlink '/usr/local/bin/http-server'
npm ERR!  { Error: EACCES: permission denied, unlink '/usr/local/bin/http-server'
npm ERR!   cause: 
npm ERR!    { Error: EACCES: permission denied, unlink '/usr/local/bin/http-server'
npm ERR!      errno: -13,
npm ERR!      code: 'EACCES',
npm ERR!      syscall: 'unlink',
npm ERR!      path: '/usr/local/bin/http-server' },
npm ERR!   stack: 'Error: EACCES: permission denied, unlink \'/usr/local/bin/http-server\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'unlink',
npm ERR!   path: '/usr/local/bin/http-server' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

Try it without global flag and sudo

$ npm install swagger-spec-to-pdf

get same error message as above

Try manual install http-server as mentioned as error message above

$ npm i -g http-server

http-server is installed, then run again

$ npm install swagger-spec-to-pdf

still get same error message as above

What should I do to getting this done?
Please advise.

@agreatfool
Copy link
Owner

Hi, sorry for the late reply. Seems this is a rare case. Could you please provide the node version & npm version you using?

For now, just two fix:

  1. check the tips npm official: How to Prevent Permissions Errors
  2. try to use yarn to install the package

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

2 participants