question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation error: EACCES: permission denied

See original GitHub issue
lorien@air:/web/token_qwerty$ sudo npm install --save -g solgraph
npm WARN deprecated babel-preset-es2015@6.24.1: πŸ™Œ  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/bin/solgraph -> /usr/lib/node_modules/solgraph/solgraph.js

> solgraph@0.2.6 postinstall /usr/lib/node_modules/solgraph
> npm run build

npm ERR! path /root/.npm/_logs
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall scandir
npm ERR! Error: EACCES: permission denied, scandir '/root/.npm/_logs'
npm ERR!  { Error: EACCES: permission denied, scandir '/root/.npm/_logs'
npm ERR!   stack: 'Error: EACCES: permission denied, scandir \'/root/.npm/_logs\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'scandir',
npm ERR!   path: '/root/.npm/_logs' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.
glob error { Error: EACCES: permission denied, scandir '/root/.npm/_logs'
  stack: 'Error: EACCES: permission denied, scandir \'/root/.npm/_logs\'',
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '/root/.npm/_logs' }

> solgraph@0.2.6 build /usr/lib/node_modules/solgraph
> babel -d dist src

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/solgraph/dist'
    at Object.fs.mkdirSync (fs.js:892:18)
    at sync (/usr/lib/node_modules/solgraph/node_modules/mkdirp/index.js:71:13)
    at outputFileSync (/usr/lib/node_modules/solgraph/node_modules/output-file-sync/index.js:44:24)
    at write (/usr/lib/node_modules/solgraph/node_modules/babel-cli/lib/babel/dir.js:33:5)
    at handleFile (/usr/lib/node_modules/solgraph/node_modules/babel-cli/lib/babel/dir.js:43:7)
    at /usr/lib/node_modules/solgraph/node_modules/babel-cli/lib/babel/dir.js:61:9
    at Array.forEach (<anonymous>)
    at handle (/usr/lib/node_modules/solgraph/node_modules/babel-cli/lib/babel/dir.js:59:29)
    at Array.forEach (<anonymous>)
    at module.exports (/usr/lib/node_modules/solgraph/node_modules/babel-cli/lib/babel/dir.js:69:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! solgraph@0.2.6 build: `babel -d dist src`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the solgraph@0.2.6 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              npm update check failed              β”‚
β”‚        Try running with sudo or get access        β”‚
β”‚       to the local update config store via        β”‚
β”‚ sudo chown -R $USER:$(id -gn $USER) /root/.config β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/solgraph/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 243
npm ERR! solgraph@0.2.6 postinstall: `npm run build`
npm ERR! Exit status 243
npm ERR! 
npm ERR! Failed at the solgraph@0.2.6 postinstall 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/2017-10-08T02_05_08_724Z-debug.log

npm: 5.3.0 node: 8.6.0 os: debian stretch

Content of /root/.npm/_logs/2017-10-08T02_05_08_724Z-debug.log attached. 2017-10-08T02_05_08_724Z-debug.log

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

23reactions
canercidamcommented, Apr 1, 2018

This worked for me:

sudo npm install --save -g solgraph --unsafe-perm=true --allow-root
0reactions
gabriel-canaancommented, Feb 1, 2018

@d0o0 I just used your approach and npm install --save -g solgraph worked. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: EACCES: permission denied - node.js - Stack Overflow
This command fix the issue. It worked for me: sudo npm install -g --unsafe-perm=true --allow-root.
Read more >
Resolving EACCES permissions errors when installing ...
Resolving EACCES permissions errors when installing packages globally Β· Reinstall npm with a node version manager Β· Manually change npm's default directory.
Read more >
Error: EACCES: permission denied with npm - How to fix
1. Reinstalling npm with a node version manager. To publish and install packages to and from the public npm registry we must install...
Read more >
Fix NPM EACCES permission denied errors ... - YouTube
How to fix eacces permission denied errors with npm when installing a global package using Ubuntu. An easy fix is to install using...
Read more >
NPM Install - Resolving EACCES Permissions Denied
How to resolve eacces permissions denied when installing npm packages globally. Here's how you solve this issue in a couple of minutes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found