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

Unable to build with yarn v2 (berry) #7062

Closed
benoitf opened this issue Feb 4, 2020 · 6 comments
Closed

Unable to build with yarn v2 (berry) #7062

benoitf opened this issue Feb 4, 2020 · 6 comments
Labels
ci issues related to CI / tests dependencies pull requests that update a dependency file

Comments

@benoitf
Copy link
Contributor

benoitf commented Feb 4, 2020

Description

The build of Theia is throwing errors when using yarn@berry

Reproduction Steps

$ npm install yarn@berry
$ yarn 
➤ YN0009: │ vscode-ripgrep@npm:1.5.7 couldn't be built successfully (exit code 1, logs can be found here: /var/folders/tg/_5rxbhmj4xncz4szvpgswrmc0000gn/T/logfile-65915r2boX40zTeig.log)
➤ YN0009: │ @theia/debug-nodejs@workspace:packages/debug-nodejs couldn't be built successfully (exit code 1, logs can be found here: /var/folders/tg/_5rxbhmj4xncz4szvpgswrmc0000gn/T/logfile-659150VsrkYiTNp6l.log)
➤ YN0009: │ @theia/java@workspace:packages/java couldn't be built successfully (exit code 1, logs can be found here: /var/folders/tg/_5rxbhmj4xncz4szvpgswrmc0000gn/T/logfile-65915rCo30BvcREqy.log)
➤ YN0009: │ @theia/java-debug@workspace:packages/java-debug couldn't be built successfully (exit code 1, logs can be found here: /var/folders/tg/_5rxbhmj4xncz4szvpgswrmc0000gn/T/logfile-65915bLnM6OHnjy71.log)
➤ YN0009: │ @theia/monorepo@workspace:. couldn't be built successfully (exit code 1, logs can be found here: /var/folders/tg/_5rxbhmj4xncz4szvpgswrmc0000gn/T/logfile-65915XcmwjDGaSN4L.log)
➤ YN0009: │ @theia/node-pty@npm:0.7.8-theia004 couldn't be built successfully (exit code 1, logs can be found here: /var/folders/tg/_5rxbhmj4xncz4szvpgswrmc0000gn/T/logfile-65915GFK3Yc9pVCqo.log)
➤ YN0007: │ @theia/electron@workspace:dev-packages/electron must be built because it never did before or the last one failed
➤ YN0000: └ Completed in 26.99s
➤ YN0000: Failed with errors in 41.01s

OS and Theia version:
macOS Catalina / theia master branch

most errors are around peer dependencies

@akosyakov
Copy link
Member

@benoitf Cool that you are trying it out! Could we open an issue for yarn? I think they are looking into fixing backward compatibility issues or can help with figuring out what we are doing wrong.

I'm also not sure about migrating to yarn v2 yet, i've seen a lot of pushback since it breaks many projects. I would prefer that it goes mainstream first. If there is a setup though which works with yarn and yarn v2 it would be an intermediate solution.

@akosyakov akosyakov added ci issues related to CI / tests dependencies pull requests that update a dependency file labels Feb 4, 2020
@benoitf
Copy link
Contributor Author

benoitf commented Feb 4, 2020

@akosyakov yes it was more like chicken and egg problem about using new tool and waiting that the tool is working without trying.

about the current errors it may be linked to yarnpkg/berry#587 and missing some explicit dependencies

@benoitf
Copy link
Contributor Author

benoitf commented Aug 10, 2020

yarn 2.1 is now providing yarn workspaces list instead of yarn workspaces info

but this command is used in many .js scripts like

scripts/check-publish.js
scripts/compile-references.js
scripts/prepare-travis.js

so it is crashing

@DerangedMind
Copy link

Hello! Is there any progress on supporting Yarn v2? Or possibly anyone who is working on the upgrade that has a list of items that need to be looked at or other issues related to this? Thanks for your help!

@venciallee
Copy link
Contributor

venciallee commented Nov 26, 2021

Build error(tsc not found) in gitlab runner while upgrate to Theia 1.19.0, I found this error has fixed in yarn v2, here is the link
Warning: pattern is trying to unpack in the same destination #4812

[Error log]

warning Pattern ["typescript@latest"] is trying to unpack in the same destination "xxx/yarn/v6/npm-typescript-4.5.2-8ac1fba9f52256fdb06fb89e4122fa6a346c2998-integrity/node_modules/typescript" 
as pattern ["typescript@^4.4.3"]. This could result in non-deterministic behavior, skipping.

.....


xxx-extension: /bin/sh: tsc: not found

  1. "typescript@^4.4.3" was dependence by localization-manager@1.19.0
// localization-manager extension package.xml

"dependencies": {
    ...
    // should we define in "devDependencies"? 
    "typescript": "^4.4.3"  
 }
  1. here is my yarn.lock

"@theia/localization-manager@1.19.0":
  version "1.19.0"
  resolved "https://registry.npmjs.org/@theia/localization-manager/-/localization-manager-1.19.0.tgz#6b6eab185c032b376f72c0ddc2a07e6a51ebd4ea"
  integrity sha512-bzVZNraNU181CyRI7EVKbkFSM7Q/gZ79avXoZISTWNQSZBdU7mHJiSDDZIIl9qzJdjo5fxtml5oUI98TRw0lnA==
  dependencies:
    "@types/fs-extra" "^4.0.2"
    deepmerge "^4.2.2"
    fs-extra "^4.0.2"
    glob "^7.2.0"
    typescript "^4.4.3"

typescript@^3.8.3:
  version "3.9.10"
  resolved "http://xxx/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"
  integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==

typescript@^4.1.3, typescript@latest:
  version "4.5.2"
  resolved "http://xxx/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998"
  integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==

  • Question:
    1. Does localization-manager need to define "typescript": "^4.4.3" in dependencies?
    2. It seem the best solution is upgrading to yarn v2?

@vince-fugnitto
Copy link
Member

vince-fugnitto commented Nov 28, 2022

Closing in favor of supporting yarn 3 instead, which is documented to have an easier migration (1 to 3) in comparison to 2 (#11924).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci issues related to CI / tests dependencies pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

5 participants