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

[Bug?]: Can't run Yarn at all #6220

Open
1 task
joseandresgavilanes opened this issue Apr 11, 2024 · 1 comment
Open
1 task

[Bug?]: Can't run Yarn at all #6220

joseandresgavilanes opened this issue Apr 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@joseandresgavilanes
Copy link

joseandresgavilanes commented Apr 11, 2024

Self-service

  • I'd be willing to implement a fix

Describe the bug

I'm trying to run yarn but it doesn't work. I already tried to install it again and moved between node versions but the same error appears over and over again no matter the yarn command I run. I tried using npm to install it and via the installer. This problem is happening globally not only in projects.

YAMLException: end of the stream or a document separator is expected at line 1, column 1:

^
at generateError (C:\Program Files (x86)\Yarn\lib\cli.js:126022:10)
at throwError (C:\Program Files (x86)\Yarn\lib\cli.js:126028:9)
at readDocument (C:\Program Files (x86)\Yarn\lib\cli.js:127394:5)
at loadDocuments (C:\Program Files (x86)\Yarn\lib\cli.js:127430:5)
at load (C:\Program Files (x86)\Yarn\lib\cli.js:127451:19)
at safeLoad (C:\Program Files (x86)\Yarn\lib\cli.js:127473:10)
at parse (C:\Program Files (x86)\Yarn\lib\cli.js:63707:18)
at module.exports.exports.default (C:\Program Files (x86)\Yarn\lib\cli.js:63258:96)
at loadRcFile (C:\Program Files (x86)\Yarn\lib\cli.js:56992:58)
at C:\Program Files (x86)\Yarn\lib\cli.js:56966:14

To reproduce

Yarn [something]

Environment

yarn dlx -q envinfo --preset jest
YAMLException: end of the stream or a document separator is expected at line 1, column 1:

    ^
    at generateError (C:\Program Files (x86)\Yarn\lib\cli.js:126022:10)
    at throwError (C:\Program Files (x86)\Yarn\lib\cli.js:126028:9)
    at readDocument (C:\Program Files (x86)\Yarn\lib\cli.js:127394:5)
    at loadDocuments (C:\Program Files (x86)\Yarn\lib\cli.js:127430:5)
    at load (C:\Program Files (x86)\Yarn\lib\cli.js:127451:19)
    at safeLoad (C:\Program Files (x86)\Yarn\lib\cli.js:127473:10)
    at parse (C:\Program Files (x86)\Yarn\lib\cli.js:63707:18)
    at module.exports.exports.default (C:\Program Files (x86)\Yarn\lib\cli.js:63258:96)
    at loadRcFile (C:\Program Files (x86)\Yarn\lib\cli.js:56992:58)
    at C:\Program Files (x86)\Yarn\lib\cli.js:56966:14

Additional context

Using Windows OS

@joseandresgavilanes joseandresgavilanes added the bug Something isn't working label Apr 11, 2024
@joseandresgavilanes joseandresgavilanes changed the title [Bug?]: Can not run Yarn at all [Bug?]: Can't run Yarn at all Apr 11, 2024
@clemyan
Copy link
Contributor

clemyan commented Apr 18, 2024

Check .yarnrc.yml and .yarnrc in the cwd and in the home directory. There is probably a malformed YAML file among those.

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