这是indexloc提供的服务,不要输入任何密码
Skip to content

Run yarn build fails with turbo@1.0.24 on Windows when yarn.lock file has \n as EOL char. #536

@viniciuspjardim

Description

@viniciuspjardim

What version of Turborepo are you using?

1.0.24

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

Yarn v1

What operating system are you using?

Windows

Describe the Bug

On Windows 10, the command yarn build fails with the following error when we have the EOL char as \n in yarn.lock file:

$ yarn build
yarn run v1.22.15
$ turbo run build
 ERROR  yarn.lock: could not unmarshal lockfile: yaml: line 17: could not find expected ':'
child_process.js:830
    throw err;
    ^

Error: Command failed: D:\Dropbox\projetos\js\turborepo-test\node_modules\turbo-windows-64\turbo.exe run build
    at checkExecSyncError (child_process.js:790:11)
    at Object.execFileSync (child_process.js:827:15)
    at Object.<anonymous> (D:\Dropbox\projetos\js\turborepo-test\node_modules\turbo\bin\turbo:5:26)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 4316,
  stdout: null,
  stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This issue only happen using turbo@1.0.24. If I install the version 1.0.23 it builds fine.

With the EOL \r\n the build works fine in 1.0.24.

Info: I saw this error before in previous versions of Turborepo on Linux when we had \r\n in yarn.lock file as EOL char.

Expected Behavior

I think the command yarn build should work in Windows / Linux with both EOL char \r\n or only \n.

To Reproduce

Clone the following project in a Windows machine:

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

I'm in the branch add-gitlab-ci, commit e1079eaff16afca3d1f72cf1e11b55d20dd986a5 now.

Make sure that Git did not change the EOL to \r\n in yarn.lock file.

Then run yarn install then yarn build. The last command is failing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions