[Bug?]: YAMLException: bad indentation of a mapping entry at line
See original GitHub issueSelf-service
- I’d be willing to implement a fix
Describe the bug
Trying install package or importing a plugin through the commands yarn install & yarn plugin import typescript` throws the following error:
YAMLException: bad indentation of a mapping entry at line 4, column 15:
dependencies:
^
dependencies:
^
at Bq (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:24:789)
at $e (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:24:891)
at ABe (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:31:1922)
at Dc (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:31:4422)
at gBe (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:31:6569)
at Dq (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:32:260)
at xq (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:32:481)
at hBe (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:32:759)
at twe (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:255:142)
at Kr (E:\Projects\frontend\blog\.yarn\releases\yarn-3.0.2.cjs:255:490)
To reproduce
Follow the steps provide in the migration guide & then try to “install” the list of packages or “import” a plugin. And it throws the error mentioned above.
Environment
System:
OS: Windows 10 10.0.19043
CPU: (2) x64 Intel(R) Pentium(R) CPU G3220 @ 3.00GHz
Binaries:
Node: 16.7.0 - ~\AppData\Local\Temp\xfs-0697d3cd\node.CMD
Yarn: 3.0.2 - ~\AppData\Local\Temp\xfs-0697d3cd\yarn.CMD
npm: 7.19.1 - C:\Program Files\nodejs\npm.CMD
Additional context
Screenshot attached for further reference:

Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
YAMLException: bad indentation of a mapping entry
In the OpenAPI definition below, the parameter LayoutId causes the parser error "bad indentation of a mapping entry".
Read more >YAML error in azure-pipelines.yml: "Bad indentation of a ...
I ran into two related errors yesterday while I was working on an Azure DevOps pipeline script: “bad indentation of a mapping entry”...
Read more >Error: bad indentation of a mapping entry - Zigbee
I'm getting a configuration error that i can't for the life of me figure ... Error: bad indentation of a mapping entry at...
Read more >Cannot parse "serverless.yml": bad indentation of a mapping ...
With the above code, I get the following error: Cannot parse "serverless.yml": bad indentation of a mapping entry in ...
Read more >homer-dashboard/community - Gitter
Manjunath Beli. @belibug. i get below error message YAMLException: bad indentation of a mapping entry at line 68, column 9: tag: "app" ^....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just in case anyone else ends up with this same problem, this keeps happening to to me after merging in Dependabot PRs. The workaround is to delete the
yarn.lockfile that I did not modify myself (nor would), and runyarn installagain. Just seems a bit odd considering there was definitely no merge conflict reported or I wouldn’t have even been able to merge the PR… strange times.EDIT: Another, simpler way that doesn’t involve deleting the
yarn.lockfile, is to merge one PR, pull changes, runyarn installto regenerate the lock file, push again to kick off another Dependabot build. Rinse and repeat for each PR. 😅 At least for now until yarn v2 and v3 are supported by Dependabot.Apparently, Dependabot doesn’t support yarn v2 & v3.