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

build: upgrade to npm@latest or yarn@latest #1884

Closed
jaketrent opened this issue Jul 1, 2021 · 3 comments
Closed

build: upgrade to npm@latest or yarn@latest #1884

jaketrent opened this issue Jul 1, 2021 · 3 comments
Labels
tech-debt Low priority features or bug-fixes

Comments

@jaketrent
Copy link
Contributor

jaketrent commented Jul 1, 2021

I would prefer npm to yarn.

Because:

  • Comes with node install. Not a separate lib
  • Applicable feature set is mutually similar with yarn (npm@latest includes workspaces)

Either way, running into this problem on yarn@1.22:

yarnpkg/yarn#7807

yarn install

=> error An unexpected error occurred: "expected workspace package to exist for \"babel-loader\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/jaketrent/dev/design-system/packages/icon/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
error Command failed.
Exit code: 1

Also getting this for yarn add commands in packages.

Solved it with reverting to yarn@1.18:

yarnpkg/yarn#7807 (comment)

yarn policies set-version 1.18.0

Feeling like yarn@1.x is dead: yarnpkg/yarn#7734 (comment)

@jaketrent jaketrent added tech-debt Low priority features or bug-fixes needs-triage Things that we need to make a decision on for a next step. labels Jul 1, 2021
jaketrent added a commit that referenced this issue Jul 1, 2021
In order to be able to install successfully

Related: #1884
@jaketrent
Copy link
Contributor Author

jaketrent commented Jul 6, 2021

Team triage: use npm@latest.

In the meantime, another potential workaround: https://github.com/lerna/lerna/tree/main/commands/add#readme

GitHub
🐉 A tool for managing JavaScript projects with multiple packages. - lerna/lerna

@jaketrent jaketrent removed the needs-triage Things that we need to make a decision on for a next step. label Jul 6, 2021
@EdwardIrby
Copy link
Contributor

Need to document this in #1968 in transition internal best pracices

@caseybaggz
Copy link
Contributor

NPM latest causes break in the build and testing environment. Yarn cannot be upgraded to latest because Lerna and Gatsby do not support Yarn 2+. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Low priority features or bug-fixes
Projects
None yet
Development

No branches or pull requests

3 participants