Skip to content

Migrate from yarn to npm - #214

Merged
fzaninotto merged 2 commits into
masterfrom
migrate-to-npm
Sep 14, 2026
Merged

fzaninotto merged 2 commits into
masterfrom
migrate-to-npm

Conversation

@fzaninotto

Copy link
Copy Markdown
Member

Yarn 1 fails to install the dependency tree as soon as two versions of vite have to coexist (vitest accepts vite 6, 7 or 8 while the project pins vite 7), and breaks with "Invariant Violation: could not find a copy of vite to link". Yarn 1 is no longer maintained, so migrate to npm, which deduplicates vite to a single copy.

  • replace yarn.lock with package-lock.json, in the root and in the node example
  • drop the yarn packageManager field
  • replace the deprecated prepublish script with prepublishOnly
  • use npm in the Makefile
  • replace bahmutov/npm-install with npm ci in the CI workflow, and update checkout/setup-node to v4 on Node 24 (Node 20 is deprecated on GitHub Actions runners)

Yarn 1 fails to install the dependency tree as soon as two versions of
vite have to coexist (vitest accepts vite 6, 7 or 8 while the project
pins vite 7), and breaks with "Invariant Violation: could not find a
copy of vite to link". Yarn 1 is no longer maintained, so migrate to
npm, which deduplicates vite to a single copy.

- replace yarn.lock with package-lock.json, in the root and in the node
  example
- drop the yarn packageManager field
- replace the deprecated prepublish script with prepublishOnly
- use npm in the Makefile
- replace bahmutov/npm-install with npm ci in the CI workflow, and
  update checkout/setup-node to v4 on Node 24 (Node 20 is deprecated on
  GitHub Actions runners)
@fzaninotto
fzaninotto merged commit 8e6e961 into master Sep 14, 2026
1 check passed
@fzaninotto fzaninotto added this to the 3.3.2 milestone Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant