Aubin
Aubin

Reputation: 14853

How to migrate a project from npm to pnpm

We have built a project with a deep tree of dependencies with npm install and have a lot of issues under Microsoft Windows (secondary target).

I have read about pnpm and it seems to be a solution for us.

How to migrate our nested repository?

Build a new one from scratch, using pnpm?

Upvotes: 14

Views: 11124

Answers (2)

Aubin
Aubin

Reputation: 14853

Finally, I have made a backup of node_modules and rebuilt it from scratch with pnpm and added concat to have only one JavaScript source and applied Google-compiler to it.

The only difficulty was about bootstrap because it has changed a lot in two years. We need to keep the old look of it, so the command I used is pnpm install [email protected].

After completion, the look and feel was identical but node_modules has grew from 8 MB to 12 MB...

Upvotes: 5

yamanidev
yamanidev

Reputation: 539

You can pnpm import which takes your package-lock.json or yarn.lock and generates pnpm's lock file pnpm-lock.yaml. After that, you can pnpm install to install the dependencies of the project.

documentation

Upvotes: 5

Related Questions