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

yarn permission denied #23

Closed
viki53 opened this issue Jan 23, 2018 · 4 comments
Closed

yarn permission denied #23

viki53 opened this issue Jan 23, 2018 · 4 comments

Comments

@viki53
Copy link

viki53 commented Jan 23, 2018

Hi, I am trying to use the second example in the README.md but I keep getting an error on all yarn commands (yarn config set and yarn install all the same).

$ yarn config set cache-folder .yarn
yarn config v1.3.2
error An unexpected error occurred: "EACCES: permission denied, scandir '/home/php/.config/yarn/link'".
info If you think this is a bug, please open a bug report with the information provided in "/builds/argonautes/diabeduc/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/config for documentation about this command.
Uploading artifacts...
./storage/logs: found 2 matching files             
Uploading artifacts to coordinator... ok            id=242 responseStatus=201 Created token=NKogK5tH
ERROR: Job failed: exit code 1

My service looks like this:

unit-testing:
  stage: test
  image: edbizarro/gitlab-ci-pipeline-php:7.1-alpine
  only:
    - gitlab-ci
  services:
    - mysql:5.7
  script:
    - yarn config set cache-folder .yarn
    - yarn install --pure-lockfile
    - composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
    - cp .env.example .env
    - php artisan key:generate
    - php artisan migrate:refresh --seed
    - ./vendor/phpunit/phpunit/phpunit -v --coverage-text --colors=never --stderr
  tags:
    - php
    - test
  artifacts:
    paths:
      - ./storage/logs # for debugging
    expire_in: 1 days
    when: always

Any idea what goes wrong?

@edbizarro
Copy link
Owner

hi @viki53 run with sudo, sudo yarn config set cache-folder .yarn

@viki53
Copy link
Author

viki53 commented Jan 23, 2018

That seems like a dangerous fix, having to run yarn install with sudo rights, but it works well enough for now…

Now I have to figure out why node-sass won't build. Thanks!

@edbizarro
Copy link
Owner

only global commands, like yarn global and yarn config needs sudo, don't need for yarn install

@edbizarro
Copy link
Owner

I'm closing this issue because the broken node-saas will be fixed in the next release

Ref: #24

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