简体   繁体   English

如何将项目从 npm 迁移到 pnpm

[英]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).我们使用npm install构建了一个具有深度依赖关系树的项目,并且在 Microsoft Windows(次要目标)下存在很多问题。

I have read about pnpm and it seems to be a solution for us.我已经阅读了pnpm ,它似乎是我们的解决方案。

How to migrate our nested repository?如何迁移我们的嵌套存储库?

Build a new one from scratch, using pnpm ?使用pnpm从头开始构建一个新的?

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.最后,我已经做过的备份node_modules ,并从废墟中重建它pnpm并添加concat到只有一个JavaScript源和应用Google-compiler它。

The only difficulty was about bootstrap because it have changed a lot in two years.唯一的困难是关于bootstrap因为它在两年内发生了很大的变化。 We need to keep the old look of it, so the command I used is pnpm install bootstrap@3.3.7 .我们需要保留它的旧外观,所以我使用的命令是pnpm install bootstrap@3.3.7

After completion, the look and feel was identical but node_modules has grew from 8 Mo to 12 Mo...完成后,外观和感觉是相同的,但node_modules从 8 Mo 增长到 12 Mo ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM