question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug?]: YAMLException: bad indentation of a mapping entry at line

See original GitHub issue

Self-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:

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
kahboomcommented, Feb 9, 2022

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.lock file that I did not modify myself (nor would), and run yarn install again. 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.lock file, is to merge one PR, pull changes, run yarn install to 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.

0reactions
shishkincommented, Feb 9, 2022

… this keeps happening to to me after merging in Dependabot PRs.

Apparently, Dependabot doesn’t support yarn v2 & v3.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found