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

GCP Cloud Build: EACCES: permission denied, mkdir '/workspace/node_modules' #181

Open
xuanswe opened this issue Aug 12, 2021 · 1 comment
Labels

Comments

@xuanswe
Copy link

xuanswe commented Aug 12, 2021

Describe the bug

I have this error on GCP Cloud Build:

error Could not write file "/workspace/yarn-error.log": "EACCES: permission denied, open '/workspace/yarn-error.log'"
error An unexpected error occurred: "EACCES: permission denied, mkdir '/workspace/node_modules'".

To Reproduce
Steps to reproduce the behavior:

  1. cloudbuild.yaml
steps:
  - name: zenika/alpine-chrome:89-with-node-14
    dir: '/usr/src/app'
    entrypoint: yarn
    args: [ 'install' ]
  1. Run the build on GCP Cloud Build, I got error message:
error Could not write file "/workspace/yarn-error.log": "EACCES: permission denied, open '/workspace/yarn-error.log'"
error An unexpected error occurred: "EACCES: permission denied, mkdir '/workspace/node_modules'".
  1. If now, I change cloudbuild.yaml as below:
steps:
  - name: node:14
    entrypoint: yarn
    args: [ 'install' ]
  - name: zenika/alpine-chrome:89-with-node-14
    entrypoint: yarn
    args: [ 'test' ]
  1. The first step works, but 2nd step has new error message:
Step #1: Error: EACCES: permission denied, open '/builder/home/.config/yarn'
Step #1:     at Object.openSync (fs.js:476:3)
Step #1:     at readFileSync (fs.js:377:35)
Step #1:     at /usr/share/node_modules/yarn/lib/cli.js:101332:58
Step #1:     at Array.map (<anonymous>)
Step #1:     at parseRcPaths (/usr/share/node_modules/yarn/lib/cli.js:101330:78)
Step #1:     at Object.findRc (/usr/share/node_modules/yarn/lib/cli.js:101344:10)
Step #1:     at getRcConfigForCwd (/usr/share/node_modules/yarn/lib/cli.js:56916:74)
Step #1:     at /usr/share/node_modules/yarn/lib/cli.js:92695:56
Step #1:     at Generator.next (<anonymous>)
Step #1:     at step (/usr/share/node_modules/yarn/lib/cli.js:310:30)

Additional context
Running locally with Docker for Windows on my machine, everything is fine.

@xuanswe xuanswe added the bug label Aug 12, 2021
@a-stankevich
Copy link

I observe the same issue. Have you been able to find a solution?

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

No branches or pull requests

2 participants