ProtonMail / WebClients

Monorepo hosting the proton web clients
GNU General Public License v3.0
4.27k stars 545 forks source link

Yarn install error with version 3.1.1 #265

Closed razzius closed 1 year ago

razzius commented 2 years ago

I have cloned the repository to the lastest main commit 20a9a7a54b5d5da4b8b5dc7d19731a3d7dc5be90 (Jan 13) following the instructions in the readme, but yarn install gives me an error:

WebClients $ yarn --version
3.1.1
WebClients $ node --version
v16.13.2
WebClients $ yarn install
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @mdx-js/loader@npm:1.6.22 doesn't provide react (p12550), requested by @mdx-js/react
➤ YN0002: │ @netlify/build@npm:26.1.0 doesn't provide @types/node (pc670b), requested by ts-node
➤ YN0002: │ @netlify/build@npm:26.1.0 doesn't provide typescript (pdb362), requested by ts-node
➤ YN0002: │ @proton/components@workspace:packages/components doesn't provide @testing-library/dom (p9252c), requested by @testing-library/user-event
➤ YN0060: │ @proton/components@workspace:packages/components provides react (p82be0) with version 17.0.2, which doesn't satisfy what react-codemirror2 requests
➤ YN0060: │ @proton/components@workspace:packages/components provides react (pa005e) with version 17.0.2, which doesn't satisfy what react-virtualized requests
➤ YN0060: │ @proton/components@workspace:packages/components provides react-dom (p92a6f) with version 17.0.2, which doesn't satisfy what react-virtualized requests
➤ YN0002: │ @proton/components@workspace:packages/components [22420] doesn't provide @testing-library/dom (p4fb17), requested by @testing-library/user-event
➤ YN0060: │ @proton/components@workspace:packages/components [22420] provides react (p305d2) with version 17.0.2, which doesn't satisfy what react-codemirror2 requests
➤ YN0060: │ @proton/components@workspace:packages/components [22420] provides react (p74905) with version 17.0.2, which doesn't satisfy what react-virtualized requests
➤ YN0060: │ @proton/components@workspace:packages/components [22420] provides react-dom (p05ba9) with version 17.0.2, which doesn't satisfy what react-virtualized requests
➤ YN0002: │ @proton/components@workspace:packages/components [f806e] doesn't provide @testing-library/dom (p4cafb), requested by @testing-library/user-event
➤ YN0060: │ @proton/components@workspace:packages/components [f806e] provides react (p45653) with version 17.0.2, which doesn't satisfy what react-codemirror2 requests
➤ YN0060: │ @proton/components@workspace:packages/components [f806e] provides react (pd50ac) with version 17.0.2, which doesn't satisfy what react-virtualized requests
➤ YN0060: │ @proton/components@workspace:packages/components [f806e] provides react-dom (p8d78c) with version 17.0.2, which doesn't satisfy what react-virtualized requests
➤ YN0002: │ @proton/cross-storage@workspace:packages/cross-storage doesn't provide @proton/styles (p0d5ed), requested by @proton/shared
➤ YN0002: │ @proton/cross-storage@workspace:packages/cross-storage doesn't provide prettier (p1cdd2), requested by @proton/eslint-config-proton
➤ YN0002: │ @proton/eslint-config-proton@workspace:packages/eslint-config-proton doesn't provide eslint-plugin-jsx-a11y (p0da30), requested by eslint-config-airbnb
➤ YN0002: │ @proton/eslint-config-proton@workspace:packages/eslint-config-proton [36a01] doesn't provide eslint-plugin-jsx-a11y (p1e115), requested by eslint-config-airbnb
➤ YN0002: │ @proton/eslint-config-proton@workspace:packages/eslint-config-proton [a86c8] doesn't provide eslint-plugin-jsx-a11y (p97f9f), requested by eslint-config-airbnb
➤ YN0002: │ @proton/eslint-config-proton@workspace:packages/eslint-config-proton [d7df5] doesn't provide eslint-plugin-jsx-a11y (pd9c80), requested by eslint-config-airbnb
➤ YN0002: │ @proton/key-transparency@workspace:packages/key-transparency doesn't provide @proton/styles (pe2b8f), requested by @proton/shared
➤ YN0002: │ @proton/key-transparency@workspace:packages/key-transparency doesn't provide prettier (pa6c9c), requested by @proton/eslint-config-proton
➤ YN0002: │ @proton/polyfill@workspace:packages/polyfill doesn't provide prettier (p557de), requested by @proton/eslint-config-proton
➤ YN0002: │ @proton/polyfill@workspace:packages/polyfill doesn't provide typescript (pe71fb), requested by @proton/eslint-config-proton
➤ YN0002: │ @proton/shared@workspace:packages/shared doesn't provide @babel/core (p1cfbb), requested by @babel/plugin-transform-runtime
➤ YN0002: │ @proton/shared@workspace:packages/shared [a86c8] doesn't provide @babel/core (p83932), requested by @babel/plugin-transform-runtime
➤ YN0002: │ @proton/shared@workspace:packages/shared [f806e] doesn't provide @babel/core (p3a63f), requested by @babel/plugin-transform-runtime
➤ YN0002: │ @proton/srp@workspace:packages/srp doesn't provide @babel/core (p24c99), requested by @babel/preset-env
➤ YN0002: │ @proton/srp@workspace:packages/srp doesn't provide @babel/core (pf7717), requested by @babel/preset-typescript
➤ YN0002: │ @proton/srp@workspace:packages/srp doesn't provide @babel/core (p2ec77), requested by @babel/register
➤ YN0002: │ @proton/srp@workspace:packages/srp [34f37] doesn't provide @babel/core (p52f9a), requested by @babel/preset-env
➤ YN0002: │ @proton/srp@workspace:packages/srp [34f37] doesn't provide @babel/core (p233fe), requested by @babel/preset-typescript
➤ YN0002: │ @proton/srp@workspace:packages/srp [34f37] doesn't provide @babel/core (p0d222), requested by @babel/register
➤ YN0060: │ @proton/styles@workspace:packages/styles provides stylelint (pe6a1c) with version 13.13.1, which doesn't satisfy what stylelint-use-logical requests
➤ YN0002: │ eslint-config-airbnb-typescript@npm:16.1.0 [09560] doesn't provide eslint (p8b19e), requested by eslint-config-airbnb-base
➤ YN0002: │ eslint-config-airbnb-typescript@npm:16.1.0 [09560] doesn't provide eslint-plugin-import (p623c8), requested by eslint-config-airbnb-base
➤ YN0002: │ eslint-config-airbnb-typescript@npm:16.1.0 [a7224] doesn't provide eslint (p5cfc3), requested by eslint-config-airbnb-base
➤ YN0002: │ eslint-config-airbnb-typescript@npm:16.1.0 [a7224] doesn't provide eslint-plugin-import (pd0c56), requested by eslint-config-airbnb-base
➤ YN0002: │ proton-account@workspace:applications/account doesn't provide @babel/core (pe5508), requested by @babel/preset-typescript
➤ YN0002: │ proton-account@workspace:applications/account doesn't provide @babel/core (p1c87a), requested by babel-jest
➤ YN0002: │ proton-account@workspace:applications/account doesn't provide @proton/srp (p4d99c), requested by @proton/components
➤ YN0002: │ proton-account@workspace:applications/account doesn't provide pmcrypto (p9570c), requested by @proton/components
➤ YN0002: │ proton-calendar@workspace:applications/calendar doesn't provide @babel/core (pcc305), requested by @babel/preset-typescript
➤ YN0002: │ proton-calendar@workspace:applications/calendar doesn't provide @babel/core (p48d22), requested by babel-jest
➤ YN0002: │ proton-calendar@workspace:applications/calendar doesn't provide @proton/srp (pd187d), requested by @proton/components
➤ YN0002: │ proton-calendar@workspace:applications/calendar doesn't provide @testing-library/dom (pfc140), requested by @testing-library/user-event
➤ YN0002: │ proton-calendar@workspace:applications/calendar doesn't provide pmcrypto (p0a70b), requested by @proton/components
➤ YN0002: │ proton-drive@workspace:applications/drive doesn't provide @proton/srp (p50017), requested by @proton/components
➤ YN0002: │ proton-drive@workspace:applications/drive doesn't provide pmcrypto (pa0180), requested by @proton/components
➤ YN0002: │ proton-mail@workspace:applications/mail doesn't provide @babel/core (p6bcfa), requested by @babel/plugin-transform-runtime
➤ YN0002: │ proton-mail@workspace:applications/mail doesn't provide @babel/core (pcc458), requested by babel-jest
➤ YN0002: │ proton-mail@workspace:applications/mail doesn't provide @proton/srp (p7ceaa), requested by @proton/components
➤ YN0002: │ proton-mail@workspace:applications/mail doesn't provide pmcrypto (p17dda), requested by @proton/components
➤ YN0002: │ proton-storybook@workspace:applications/storybook doesn't provide @proton/srp (pd4dc9), requested by @proton/components
➤ YN0002: │ proton-storybook@workspace:applications/storybook doesn't provide pmcrypto (pcb343), requested by @proton/components
➤ YN0002: │ proton-verify@workspace:applications/verify doesn't provide @babel/core (p95f67), requested by babel-jest
➤ YN0002: │ proton-verify@workspace:applications/verify doesn't provide @proton/srp (p6f1bd), requested by @proton/components
➤ YN0002: │ proton-verify@workspace:applications/verify doesn't provide pmcrypto (p5a539), requested by @proton/components
➤ YN0002: │ proton-vpn-settings@workspace:applications/vpn-settings doesn't provide @proton/srp (p2f0bd), requested by @proton/components
➤ YN0002: │ proton-vpn-settings@workspace:applications/vpn-settings doesn't provide pmcrypto (pa27a0), requested by @proton/components
➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide typescript (p79ddf), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide webpack (p2af19), requested by fork-ts-checker-webpack-plugin
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 289ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ interval-tree@https://github.com/ProtonMail/interval-tree.git#commit=cd86c8a87f29ae833d5a4cef8caabd47e8449cdd can't be found in the cache and will be fetched from GitHub
➤ YN0013: │ interval-tree@https://github.com/ProtonMail/interval-tree.git#commit=cd86c8a87f29ae833d5a4cef8caabd47e8449cdd can't be found in the cache and will be fetched from the remote repository
➤ YN0018: │ interval-tree@https://github.com/ProtonMail/interval-tree.git#commit=cd86c8a87f29ae833d5a4cef8caabd47e8449cdd: The remote archive doesn't match the expected checksum
➤ YN0013: │ mutex-browser@https://github.com/ProtonMail/mutex-browser.git#commit=7ff17672ec033203714507b39a5c5f3fe276033b can't be found in the cache and will be fetched from GitHub
➤ YN0013: │ mutex-browser@https://github.com/ProtonMail/mutex-browser.git#commit=7ff17672ec033203714507b39a5c5f3fe276033b can't be found in the cache and will be fetched from the remote repository
➤ YN0018: │ mutex-browser@https://github.com/ProtonMail/mutex-browser.git#commit=7ff17672ec033203714507b39a5c5f3fe276033b: The remote archive doesn't match the expected checksum
➤ YN0013: │ pmcrypto@https://github.com/ProtonMail/pmcrypto.git#commit=7a6092d68fb1a7247e154bc675c3f078c5c0892e can't be found in the cache and will be fetched from GitHub
➤ YN0013: │ squire-rte@https://github.com/ProtonMail/Squire.git#commit=5b08185f5c52ccdd7c526708bcfd7246c3745ca3 can't be found in the cache and will be fetched from GitHub
➤ YN0013: │ squire-rte@https://github.com/ProtonMail/Squire.git#commit=5b08185f5c52ccdd7c526708bcfd7246c3745ca3 can't be found in the cache and will be fetched from the remote repository
➤ YN0018: │ squire-rte@https://github.com/ProtonMail/Squire.git#commit=5b08185f5c52ccdd7c526708bcfd7246c3745ca3: The remote archive doesn't match the expected checksum
➤ YN0013: │ timezone-support@https://github.com/ProtonMail/timezone-support.git#commit=c164e6c51021f3fa061034a1a7dc4571a2fadf94 can't be found in the cache and will be fetched from GitHub
➤ YN0013: │ timezone-support@https://github.com/ProtonMail/timezone-support.git#commit=c164e6c51021f3fa061034a1a7dc4571a2fadf94 can't be found in the cache and will be fetched from the remote repository
➤ YN0018: │ timezone-support@https://github.com/ProtonMail/timezone-support.git#commit=c164e6c51021f3fa061034a1a7dc4571a2fadf94: The remote archive doesn't match the expected checksum
➤ YN0013: │ pmcrypto@https://github.com/ProtonMail/pmcrypto.git#commit=7a6092d68fb1a7247e154bc675c3f078c5c0892e can't be found in the cache and will be fetched from the remote repository
➤ YN0018: │ pmcrypto@https://github.com/ProtonMail/pmcrypto.git#commit=7a6092d68fb1a7247e154bc675c3f078c5c0892e: The remote archive doesn't match the expected checksum
➤ YN0000: └ Completed in 3s 21ms
➤ YN0000: Failed with errors in 3s 315ms

I also noticed an inconsistency in the yarn versions; the README requests Yarn version 2:

You'll need to have the following environment to work with this project

  • Node.js LTS
  • Yarn 2

But the package.json expects yarn 3.1.1:

"packageManager":` "yarn@3.1.1"

Am I missing something, or is something currently wrong with the yarn install?

mmso commented 2 years ago

Hello @razzius

Indeed we should remove the reference to "Yarn 2" and replace it by yarn since we commit yarn to the repository and it gets picked up by yarn automatically.

Regarding the checksum issue, we've seen a few internal developers getting the same error, but we haven't been able to figure out why it's happening. We think it might be a bug in yarn itself. Here is a related issue (possibly not the same) https://github.com/yarnpkg/berry/issues/2399.

What operating system do you use?

vladimiry commented 2 years ago

The workaround applied in https://github.com/vladimiry/ElectronMail/blob/master/scripts/prepare-webclient/webclients.ts#L258-L278 is setting the following env vars before yarn install gets executed:

                            YARN_CHECKSUM_BEHAVIOR: "update",
                            YARN_ENABLE_IMMUTABLE_INSTALLS: "false",

If the issue is still there, run yarn cache clean --all and then run installing step again.

cbin commented 2 years ago

I have exactly the same problem, yarn cache clean --all did not fix the error. OS Ubuntu 20.04

vladimiry commented 2 years ago

@cbin, YARN_CHECKSUM_BEHAVIOR=update YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install.

xet7 commented 1 year ago

Building with yarn did work for me today: https://github.com/wekan/wekan/wiki/ProtonMail

razzius commented 1 year ago

This yarn install step is working for me now. Having trouble with captcha, will open a new issue.