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

Can't run yarn at all #9052

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

Can't run yarn at all #9052

joseandresgavilanes opened this issue Apr 11, 2024 · 1 comment

Comments

@joseandresgavilanes
Copy link

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

@Daniel15
Copy link
Member

Daniel15 commented May 24, 2024

Do you have an empty .yarnrc file somewhere on your system? Try delete it.

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