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

Error while reading user config file #1270

Closed
ooflorent opened this issue May 20, 2022 · 4 comments · Fixed by #1328
Closed

Error while reading user config file #1270

ooflorent opened this issue May 20, 2022 · 4 comments · Fixed by #1328
Assignees
Labels
kind: bug Something isn't working

Comments

@ooflorent
Copy link

What version of Turborepo are you using?

1.2.7

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Linux

Describe the Bug

After updating turbo from 1.2.6 to 1.2.7, turbo crashes when it is launched. I run it in a node v16 container on self hosted GitHub Actions runner. When ran locally (on my MBP), it runs as expected.

$ turbo run test
 ERROR  reading user config file: could not create any of the following paths: /.config/turborepo, /etc/xdg/turborepo
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

It seems that #1156 introduces the issue.

Expected Behavior

turbo should not crash on startup if it is unable to read the user config file.

To Reproduce

I'm not sure what to provide here…

@jaredpalmer jaredpalmer added the kind: bug Something isn't working label May 20, 2022
@jaredpalmer
Copy link
Contributor

jaredpalmer commented May 20, 2022

Is this still happening in 1.2.9?

@ooflorent
Copy link
Author

Yes. With the same error:

 ERROR  reading user config file: could not create any of the following paths: /.config/turborepo, /etc/xdg/turborepo

@ronaldh46
Copy link

I am also getting this error using Azure DevOps Pipelines CI/CD, using the latest Turborepo.

> [email protected] build
> turbo run build

 ERROR  reading user config file: could not create any of the following paths: /home/vsts/.config/turborepo, /etc/xdg/turborepo

Any updates?

@nathanhammond
Copy link
Contributor

Hey y'all, apologies for the delay. I believe that #1328 should address this issue and make sure that we don't encounter it again.

@kodiakhq kodiakhq bot closed this as completed in #1328 Jun 6, 2022
kodiakhq bot pushed a commit that referenced this issue Jun 6, 2022
As noted in #1156 (comment), `xdg.ConfigFile` has side effects. One of the consequences of the side effects is that sometimes, when simply wanting to check for existence, we would error out entirely because the path wasn't writable.

This splits the process of creating and reading a config file path, which means that the error won't be encountered unless a user is explicitly trying to create a configuration file. (Which *should* be an error.)

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

Successfully merging a pull request may close this issue.

4 participants