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

EACCES: permission denied #59

Open
maguayo opened this issue Dec 22, 2021 · 2 comments
Open

EACCES: permission denied #59

maguayo opened this issue Dec 22, 2021 · 2 comments

Comments

@maguayo
Copy link

maguayo commented Dec 22, 2021

My code:

name: Deploy master branch

on:
  push:
    branches:
      - master

jobs:
  deploy:
    name: deploy
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x]
    steps:
    - uses: actions/checkout@v2

    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci

    - name: Deploy to eu-west-3
      uses: serverless/[email protected]
      with:
        args: deploy --stage products-new --region eu-west-3
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

    - name: Deploy to us-west-2
      uses: serverless/[email protected]
      with:
        args: deploy --stage products-new --region us-west-2
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

    - name: Deploy to us-east-1
      uses: serverless/[email protected]
      with:
        args: deploy --stage products-new --region us-east-1
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
   prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
  gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.18.2"
  gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/serverless/node_modules/snappy/.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/lib/node_modules/serverless/node_modules/snappy/.node-gyp'
  gyp ERR! System Linux 5.11.0-1022-azure
  gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  gyp ERR! cwd /usr/lib/node_modules/serverless/node_modules/snappy
  gyp ERR! node -v v14.18.2
  gyp ERR! node-gyp -v v5.1.0
  gyp ERR! not ok 

I tried with version 2.17.1 and with master, and its the same error.

@VictorHadziristic
Copy link

Any update on this?

@maguayo
Copy link
Author

maguayo commented Jan 11, 2022

I created my own Github Action because this one is not maintained

name: Deploy master
on:
  push:
    branches:
      - master
jobs:
  deploy-master:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: "10.x"

      - name: Install Serverless Framework
        run: npm install -g serverless

      - name: Serverless AWS authentication
        run: sls config credentials --provider aws --key ${{ secrets.AWS_ACCESS_KEY_ID }} --secret ${{ secrets.AWS_SECRET_ACCESS_KEY }}

      - name: Install NPM dependencies
        run: npm install

      - name: Deploy
        run: sls deploy

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