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

Yarn after turbo prune -> Syntax Error: Expected "\n", "\r", or "\r\n" but ":" found. #1975

Closed
filipjakov opened this issue Sep 15, 2022 · 2 comments
Assignees

Comments

@filipjakov
Copy link

filipjakov commented Sep 15, 2022

What version of Turborepo are you using?

1.4.6

What package manager are you using / does the bug impact?

Yarn v2/v3 (node_modules linker only)

What operating system are you using?

Mac

Describe the Bug

After running:

turbo prune --scope=<workspace>

i enter the generated out folder. Running any yarn command in that folder, results in the following error:

Syntax Error: Expected "\n", "\r", or "\r\n" but ":" found.
    at ec (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:45:1124)
    at Mpe (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:45:9766)
    at Kpe (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:327:16)
    at jpe (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:327:114)
    at Si (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:327:490)
    at ze.setupResolutions (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:439:363)
    at async Function.find (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:436:1533)
    at async bm.execute (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:572:1845)
    at async bm.validateAndExecute (/Users/name/.node/corepack/yarn/3.2.3/yarn.js:345:673)
    at async Bs.run (/Users/fbulic/.node/corepack/yarn/3.2.3/yarn.js:359:2087)

After copying the global yarn.lock and replacing the generated one, everything runs as expected.

Expected Behavior

Yarn should work as expected with prune/in the generated out folder.

To Reproduce

Environment:

  • node: 16.17.0
  • yarn (in corepack env): 3.2.3 (locally installed)
@chris-olszewski
Copy link
Contributor

Hi @filipjakov, currently prune support for Yarn 2+ is a "best attempt" and usually doesn't work. I'm currently working on a correct implementation. See #643 for more discussion about Yarn 2+ support

@chris-olszewski
Copy link
Contributor

With #2019 merged and 1.5 released this should be solved. Please update turbo and try this again. Reopen if the issue persists.

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