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

ERROR yarn.lock: yaml: line 9184: could not find expected ':' #394

Closed
NullVoxPopuli opened this issue Dec 21, 2021 · 16 comments
Closed

ERROR yarn.lock: yaml: line 9184: could not find expected ':' #394

NullVoxPopuli opened this issue Dec 21, 2021 · 16 comments

Comments

@NullVoxPopuli
Copy link

NullVoxPopuli commented Dec 21, 2021

What version of Turborepo are you using?

1.0.20-canary.1 and 1.0.19

Describe the Bug

I cannot run any command.

All commands give this error:

 ERROR  yarn.lock: yaml: line 9184: could not find expected ':'

Expected Behavior

I can run commands

To Reproduce

Here is the lockfile entry it's complaining about (it's due to yarn-resolutions being used to de-dupe the dependency).

(line 9184)

ember-cli-babel@6.11.0, ember-cli-babel@7.26.10, ember-cli-babel@7.26.6, ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.10.0, ember-cli-babel@^6.16.0, ember-cli-babel@^6.17.0, ember-cli-babel@^6.6.0, ember-cli-babel@^6.7.2, ember-cli-babel@^6.8.1, ember-cli-babel@^6.8.2, ember-cli-babel@^6.9.0, ember-cli-babel@^7.0.0, ember-cli-babel@^7.1.0, ember-cli-babel@^7.1.2, ember-cli-babel@^7.1.3, ember-cli-babel@^7.10.0, ember-cli-babel@^7.11.1, ember-cli-babel@^7.12.0, ember-cli-babel@^7.13.0, ember-cli-babel@^7.13.2, ember-cli-babel@^7.17.2, ember-cli-babel@^7.18.0, ember-cli-babel@^7.19.0, ember-cli-babel@^7.2.0, ember-cli-babel@^7.20.0, ember-cli-babel@^7.20.5, ember-cli-babel@^7.21.0, ember-cli-babel@^7.22.1, ember-cli-babel@^7.23.0, ember-cli-babel@^7.23.1, ember-cli-babel@^7.26.10, ember-cli-babel@^7.26.2, ember-cli-babel@^7.26.3, ember-cli-babel@^7.26.5, ember-cli-babel@^7.26.6, ember-cli-babel@^7.26.8, ember-cli-babel@^7.4.0, ember-cli-babel@^7.4.1, ember-cli-babel@^7.7.0, ember-cli-babel@^7.7.3:

note that there is a colon at the end. So, idk if the parser is just giving up because the line is so long or what 🤷

@NullVoxPopuli
Copy link
Author

NullVoxPopuli commented Dec 21, 2021

what's goofy is that I can edit this line to be whatever I want, even something short, and I still get the error. Maybe a cache issue is at play?


Update:

adding the --no-cache flag does not help

@jaredpalmer
Copy link
Contributor

what OS / arch are you using turbo with?

@NullVoxPopuli
Copy link
Author

NullVoxPopuli commented Dec 23, 2021

Ubuntu, x86_64

❯ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

❯ uname -a
Linux 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

what's weird is that this error doesn't happen in my other monorepo I'm testing turborepo in.
NullVoxPopuli/limber#377
(way smaller (~ 150 projects smaller))

@jaredpalmer
Copy link
Contributor

can you DM me your lockfiles on Discord ? want to see if there is some sort of weird entry

@NullVoxPopuli
Copy link
Author

NullVoxPopuli commented Dec 23, 2021

I can't sorry -- too much information in there that references or hints at internal products.

I can provide the entries around the line with the error though, cause it's just OSS packages (if this helps? 🤷 )

surrounding lockfile text
ember-cli-autoprefixer@2.0.0:
  version "2.0.0"
  resolved "<registry>/ember-cli-autoprefixer/-/ember-cli-autoprefixer-2.0.0.tgz#5c753aeb7ead9a954892cdf1f6f258abce01b907"
  integrity sha512-WVwfcwRoSjoR7NMfzsS4yWmAhs7FF5BfWzvdcyhvKl4wNzv4QSx9rjVV4dVcnY7pnj19OlSgLaXZ5Rt/P6u6dw==
  dependencies:
    broccoli-autoprefixer "^9.0.0"
    ember-cli-htmlbars "^5.0.0"

ember-cli-babel-plugin-helpers@1.1.1, ember-cli-babel-plugin-helpers@^1.0.0, ember-cli-babel-plugin-helpers@^1.1.0, ember-cli-babel-plugin-helpers@^1.1.1:
  version "1.1.1"
  resolved "<registry>/ember-cli-babel-plugin-helpers/-/ember-cli-babel-plugin-helpers-1.1.1.tgz#5016b80cdef37036c4282eef2d863e1d73576879"
  integrity sha512-sKvOiPNHr5F/60NLd7SFzMpYPte/nnGkq/tMIfXejfKHIhaiIkYFqX8Z9UFTKWLLn+V7NOaby6niNPZUdvKCRw==

ember-cli-babel@6.11.0, ember-cli-babel@7.26.10, ember-cli-babel@7.26.6, ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.10.0, ember-cli-babel@^6.16.0, ember-cli-babel@^6.17.0, ember-cli-babel@^6.6.0, ember-cli-babel@^6.7.2, ember-cli-babel@^6.8.1, ember-cli-babel@^6.8.2, ember-cli-babel@^6.9.0, ember-cli-babel@^7.0.0, ember-cli-babel@^7.1.0, ember-cli-babel@^7.1.2, ember-cli-babel@^7.1.3, ember-cli-babel@^7.10.0, ember-cli-babel@^7.11.1, ember-cli-babel@^7.12.0, ember-cli-babel@^7.13.0, ember-cli-babel@^7.13.2, ember-cli-babel@^7.17.2, ember-cli-babel@^7.18.0, ember-cli-babel@^7.19.0, ember-cli-babel@^7.2.0, ember-cli-babel@^7.20.0, ember-cli-babel@^7.20.5, ember-cli-babel@^7.21.0, ember-cli-babel@^7.22.1, ember-cli-babel@^7.23.0, ember-cli-babel@^7.23.1, ember-cli-babel@^7.26.10, ember-cli-babel@^7.26.2, ember-cli-babel@^7.26.3, ember-cli-babel@^7.26.5, ember-cli-babel@^7.26.6, ember-cli-babel@^7.26.8, ember-cli-babel@^7.4.0, ember-cli-babel@^7.4.1, ember-cli-babel@^7.7.0, ember-cli-babel@^7.7.3:
  version "7.26.10"
  resolved "<registry>/ember-cli-babel/-/ember-cli-babel-7.26.10.tgz#93565bef47b154ec0c1ceafacfd1474a01002ddc"
  integrity sha1-k1Zb70exVOwMHOr6z9FHSgEALdw=
  dependencies:
    "@babel/core" "^7.12.0"
    "@babel/helper-compilation-targets" "^7.12.0"
    "@babel/plugin-proposal-class-properties" "^7.16.5"
    "@babel/plugin-proposal-decorators" "^7.13.5"
    "@babel/plugin-proposal-private-methods" "^7.16.5"
    "@babel/plugin-proposal-private-property-in-object" "^7.16.5"
    "@babel/plugin-transform-modules-amd" "^7.13.0"
    "@babel/plugin-transform-runtime" "^7.13.9"
    "@babel/plugin-transform-typescript" "^7.13.0"
    "@babel/polyfill" "^7.11.5"
    "@babel/preset-env" "^7.16.5"
    "@babel/runtime" "7.12.18"
    amd-name-resolver "^1.3.1"
    babel-plugin-debug-macros "^0.3.4"
    babel-plugin-ember-data-packages-polyfill "^0.1.2"
    babel-plugin-ember-modules-api-polyfill "^3.5.0"
    babel-plugin-module-resolver "^3.2.0"
    broccoli-babel-transpiler "^7.8.0"
    broccoli-debug "^0.6.4"
    broccoli-funnel "^2.0.2"
    broccoli-source "^2.1.2"
    calculate-cache-key-for-tree "^2.0.0"
    clone "^2.1.2"
    ember-cli-babel-plugin-helpers "^1.1.1"
    ember-cli-version-checker "^4.1.0"
    ensure-posix-path "^1.0.2"
    fixturify-project "^1.10.0"
    resolve-package-path "^3.1.0"
    rimraf "^3.0.1"
    semver "^5.5.0"

ember-cli-blueprint-test-helpers@0.19.2:
  version "0.19.2"
  resolved "<registry>/ember-cli-blueprint-test-helpers/-/ember-cli-blueprint-test-helpers-0.19.2.tgz#9e563cd81ab39931253ced0982c5d02475895401"
  integrity sha512-otCKdGcNFK0+MkQo+LLjYbRD9EerApH6Z/odvvlL1hxrN+owHMV5E+jI2rbtdvNEH0/6w5ZqjH4kS232fvtCxQ==
  dependencies:
    chai "^4.1.0"
    chai-as-promised "^7.0.0"
    chai-files "^1.0.0"
    debug "^4.1.0"
    ember-cli-internal-test-helpers "^0.9.1"
    fs-extra "^7.0.0"
    testdouble "^3.2.6"
    tmp-sync "^1.0.0"

@viniciuspjardim
Copy link

viniciuspjardim commented Dec 24, 2021

I have a similar error in this simple example:

https://gitlab.com/viniciuspjardim/turborepo-test/-/jobs/1919352767

You can see the error in the line 110:

ERROR  yarn.lock: yaml: line 6: mapping values are not allowed in this context

The project source code is here:

https://gitlab.com/viniciuspjardim/turborepo-test

I'm in the branch add-gitlab-ci commit 48050f9dbed0e978c1752cfbc562bcaca66fec33 now.

In my local machine (Windows 10) yarn build runs fine. This error is happening only in GitLab CI.

@weyert
Copy link
Contributor

weyert commented Dec 24, 2021

Thanks for the repro's. I will have a look

@viniciuspjardim
Copy link

viniciuspjardim commented Dec 24, 2021

Update

My yarn.lock was with the EOL char \r\n. When I updated it o \n It worked...

Before:
https://gitlab.com/viniciuspjardim/turborepo-test/-/jobs/1919408047

After:
https://gitlab.com/viniciuspjardim/turborepo-test/-/jobs/1919421580

Weirdness

  • Only yarn.lock was \r\n, all other files were \n. I created the project using npx create-turbo@latest
  • Git should remove \r right? Maybe I messed up with my Git config

@jaredpalmer
Copy link
Contributor

This should be fixed in the latest canary thanks to #434

@NullVoxPopuli
Copy link
Author

NullVoxPopuli commented Dec 29, 2021

This is not resolved, :-\

❯ yarn list turbo
yarn list v1.22.17
└─ turbo@1.0.24-canary.0
Done in 3.89s.
❯ yarn turbo run start --scope="my-app" --include-dependencies
yarn run v1.22.17
$ <repo>/node_modules/.bin/turbo run start --scope=my-app --include-dependencies
 ERROR  yarn.lock: could not unmarshal lockfile: yaml: line 9712: could not find expected ':'}

Things have shifted around a bit, but line 9712 now is the same as in the original report.

❯ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

I do not have \r:

❯ file -k yarn.lock
yarn.lock: ASCII text, with very long lines

@magalhas
Copy link

Facing the same problem on the latest version 1.0.28.

@NullVoxPopuli
Copy link
Author

Just tried again, using └─ turbo@1.1.10

@productdevbook
Copy link

productdevbook commented Apr 11, 2022

1.2.1 some problem

ERROR yarn.lock: could not unmarshal lockfile: yaml: line 9: mapping values are not allowed in this context

@florianmartens
Copy link

Experiencing the same. I dont think this issue should be closed.

@NullVoxPopuli
Copy link
Author

I'd like to reopen this issue. @jaredpalmer -- I still am running in to this and cannot adopt turbo with yarn@v1 until this is resolved 😢

Using turbo 1.3.1.

can we use a different parser for the yarn.lock?
or somehow avoid needing to parse the yarn.lock?

@nathanhammond nathanhammond reopened this Jul 26, 2022
@nathanhammond
Copy link
Contributor

#948 is actually a duplicate of this but has the key detail of 1024 limit in go-yaml. As such I'm going to close this issue and we'll track the problem over there.

sokra pushed a commit that referenced this issue Oct 25, 2022
Closes #395

This implements a basic visualization of how tested bundlers scale with increasing module counts.

Test Plan:
* `git clone https://github.com/vercel/turbo-tooling --single-branch --branch benchmark-data --depth 1 turbo-tooling-benchmark-data`
* `cargo xtask summarize-benchmarks path/to/turbo-tooling-benchmark-data/data/`
* `cargo xtask visualize-bundler-benchmarks
  path/to/turbo-tooling-benchmark-data/data/ubuntu-latest-16-core.json`
* Verify svgs generated in
  `path/to/turbo-tooling/benchmark-data/data/scaling/`
* Verify bundlers use consistent colors across benchmarks with varying number of bundlers (e.g. bench hydration)

![bench_hmr_to_eval](https://user-images.githubusercontent.com/755844/191338988-1b5ff9ab-870a-49eb-8c19-2966f0900036.svg)
![bench_hydration](https://user-images.githubusercontent.com/755844/191339268-611f008a-6540-4988-8958-3658a362ec2b.svg)
![bench_restart](https://user-images.githubusercontent.com/755844/191339009-ef614f32-7be7-4824-9656-d25a249a8784.svg)
![bench_startup](https://user-images.githubusercontent.com/755844/191339025-021c7bee-7389-4e25-946b-21d6ab60237a.svg)
![bench_hmr_to_commit](https://user-images.githubusercontent.com/755844/191339174-40203fdd-6775-4c8e-b9de-26b072d8d9ed.svg)
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

8 participants