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

gyp ERR! stack Error: EACCES: permission denied, mkdir... #2023

Closed
AustinDeric opened this issue Aug 12, 2019 · 2 comments
Closed

gyp ERR! stack Error: EACCES: permission denied, mkdir... #2023

AustinDeric opened this issue Aug 12, 2019 · 2 comments

Comments

@AustinDeric
Copy link

AustinDeric commented Aug 12, 2019

Describe the bug
amplify-cli fails to install using npm install -g @aws-amplify/cli

gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/10.15.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/kerberos/.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/@aws-amplify/cli/node_modules/kerberos/.node-gyp'
gyp ERR! System Linux 4.15.0-54-generic
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/@aws-amplify/cli/node_modules/kerberos
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/10.15.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fs-ext/.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/@aws-amplify/cli/node_modules/fs-ext/.node-gyp'
gyp ERR! System Linux 4.15.0-54-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fs-ext
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0

To Reproduce
docker run -it node:10-alpine sh -c "apk add python && npm install -g @aws-amplify/cli"

Expected behavior
install cleanly

logs
amplify_cli_install_logs.txt

environment details
node 10 & 12. In used node's docker image in the steps to reproduce. I came across this issue running ubuntu 16 and was able to replicate exactly in docker.

Additional context
Older versions still work. I was able to successfully install 1.7.1:

docker run -it node:12-alpine sh -c "apk add python && npm install -g @aws-amplify/cli@1.7.1"
@kaustavghosh06
Copy link
Contributor

@AustinDeric Using npm install -g @aws-amplify/cli --unsafe-perm=true with the unsafe-perm param. Duplicate of #1996

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants