yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

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

Closed ElegantCrab closed 1 year ago

ElegantCrab commented 1 year ago

OS: Windows 11 64 bits.

No matter how i install it whenever I run

npm install -g yarn

And I have the yarn folder on my PATH, this happens:

C:\Windows\system32>yarn --version YAMLException: end of the stream or a document separator is expected at line 1, column 1:

^
at generateError (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:126022:10)
at throwError (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:126028:9)
at readDocument (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:127394:5)
at loadDocuments (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:127430:5)
at load (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:127451:19)
at safeLoad (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:127473:10)
at parse (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:63707:18)
at module.exports.exports.default (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:63258:96)
at loadRcFile (C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:56992:58)
at C:\Users\G3\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:56966:14

I have tried many fixes but none work. I'm thinking about reformatting my computer.

ElegantCrab commented 1 year ago

Fixed. Dunno why but I had a yarnrc.yml on C:\Users\ .

Deleting the file solved the issue