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 config needs sudo on macos #8

Closed
JCMais opened this issue Jun 28, 2019 · 6 comments
Closed

yarn config needs sudo on macos #8

JCMais opened this issue Jun 28, 2019 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@JCMais
Copy link

JCMais commented Jun 28, 2019

Orb version

1.1.0

What happened

Running yarn config set cache-folder ~/.cache/yarn now needs sudo. It's weird for it to ask for sudo since it should be installed for the current user.

This started happening after upgrading from 1.0.1 to 1.1.0 to get the fixes from #5

Expected behavior

Should run without sudo(?)

If that is expected please let me know.

@iynere iynere closed this as completed Jun 28, 2019
@iynere iynere reopened this Jun 28, 2019
@JCMais
Copy link
Author

JCMais commented Jun 28, 2019

So I just found that just a install needs sudo too, I don't think we should be running install with sudo:

yarn install --frozen-lockfile --cwd=.
^D��^D��yarn install v1.16.0
error An unexpected error occurred: "EACCES: permission denied, scandir '/Users/distiller/.config/yarn/link'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/distiller/project/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Exited with code 1

@iynere
Copy link
Contributor

iynere commented Jun 28, 2019

hmm, weird, it's certainly not installed with sudo.... we'll investigate, ty @JCMais

@iynere iynere self-assigned this Jun 28, 2019
@iynere iynere added the bug Something isn't working label Jun 28, 2019
@iynere
Copy link
Contributor

iynere commented Jun 28, 2019

hmmm, i'm not able to reproduce @JCMais :

https://circleci.com/gh/iynere/sandbox/640

can you send a link to the job where you saw this ?

also, you might try something like this to fix :

yarnpkg/yarn#1806 (comment)

@JCMais
Copy link
Author

JCMais commented Jun 28, 2019

Running sudo chown -R $USER:$GROUP ~/.config fixed the issue, kinda weird.

I'm closing this since I don't have time to dig into it or to check why it was happening.

@JCMais JCMais closed this as completed Jun 28, 2019
@iynere
Copy link
Contributor

iynere commented Jun 28, 2019

@JCMais well, for now, I can easily add that line to the orb code, so you won't have to keep running it 🙂 thanks !

@iynere iynere reopened this Jun 28, 2019
@iynere iynere mentioned this issue Jun 28, 2019
3 tasks
@iynere
Copy link
Contributor

iynere commented Jun 28, 2019

patched in circleci/node@1.1.2

https://github.com/CircleCI-Public/node-orb/releases/tag/v1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants