GithubHelp home page GithubHelp logo

Comments (17)

Yuyz0112 avatar Yuyz0112 commented on July 16, 2024 4

Also run into this issue, in my case, change the yarn.lock file from CRLF to LF fixes the problem.

from turbo.

amlcodes avatar amlcodes commented on July 16, 2024 3

running into this in a dockerfile

from turbo.

TheKnarf avatar TheKnarf commented on July 16, 2024 2

This is still a problem, just hit it today and was not able to find a solution. Ended up removing turbo prune from my Dockerfile as it didn't work.

Can this issue be reopened?

from turbo.

jaredpalmer avatar jaredpalmer commented on July 16, 2024 1

Thanks for the write up. Investigating

from turbo.

jaredpalmer avatar jaredpalmer commented on July 16, 2024 1

@Floffah will give it a shot

from turbo.

weyert avatar weyert commented on July 16, 2024 1

Reproducible steps for turborepo-repository:

brew install dos2unix
unix2dos yarn.lock
yarn build

Runing yarn build now gives the following response on maCOS:

❯ yarn build                   
yarn run v1.22.17
$ ./turbow.sh run build --scope=docs
unmarshal
 ERROR  yarn.lock: yaml: line 6: mapping values are not allowed in this context
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

from turbo.

bel7aG avatar bel7aG commented on July 16, 2024 1

yarn -O install

from turbo.

jaredpalmer avatar jaredpalmer commented on July 16, 2024

@Yuyz0112 is the fix here as simple as add \r\n in lockfile parsing?

from turbo.

Floffah avatar Floffah commented on July 16, 2024

@Yuyz0112 is the fix here as simple as add \r\n in lockfile parsing?

if you push a version (even just as a commit not a publish) i could try it and see if it fixes my problem because its likely the same

from turbo.

Yuyz0112 avatar Yuyz0112 commented on July 16, 2024

@jaredpalmer

Looks like the CRLF has a ^M after each line, so it breaks the first YAML field. I'm using vscode's toolbar to convert CRLF to LF.

image

from turbo.

weyert avatar weyert commented on July 16, 2024

@Floffah I am trying to assist in solve this problem. Do I understand you correctly that the problem is reproducible in your earlier mentioned repo? https://github.com/floffah/collaborated

from turbo.

Floffah avatar Floffah commented on July 16, 2024

@Floffah I am trying to assist in solve this problem. Do I understand you correctly that the problem is reproducible in your earlier mentioned repo? https://github.com/floffah/collaborated

Yes, the vercel deployments have failed with it for the past few commits

The problem may be to do with crlf in development being deployed to a lf based platform with the same crlf lock file

from turbo.

weyert avatar weyert commented on July 16, 2024

@Floffah I have been able to reproduce it locally, I am getting the following:

❯ yarn build:simple                                                                                             
yarn run v1.22.17
$ yarn turbo run build --only
$ /Users/weyert/Development/Projects/Opensource/turborepo/repros/collaborated/node_modules/.bin/turbo run build --only
unmarshal
 ERROR  yarn.lock: yaml: line 6: mapping values are not allowed in this context
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Working on a fix now :)

from turbo.

jaredpalmer avatar jaredpalmer commented on July 16, 2024

What is the suggested workaround here?

from turbo.

weyert avatar weyert commented on July 16, 2024

I was able to get it mostly working by switching to #13#10 for splitting lines but then I went down a rabbit hole of using Scanner instead. And then I got stuck on which data you exactly need from the lock file for the tool

from turbo.

borislemke avatar borislemke commented on July 16, 2024

Running into the same issue. Our original yarn.lock file is generated by yarn version 3.2.1, but when creating a prune of one of the packages, the resulting lock file is version 1.

Original file:

# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!

__metadata:
  version: 6
  cacheKey: 8

by prune:

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
...

yarn fails

$ yarn        
Syntax Error: Expected "\n", "\r", or "\r\n" but ":" found.

Steps taken:

yarn --version
# 3.2.1
npx turbo prune --scope=@some/package
cd out
yarn install # fails

from turbo.

nathanhammond avatar nathanhammond commented on July 16, 2024

Berry (Yarn 3) support is "best effort" at this time. Watch for PRs from @chris-olszewski.

from turbo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.