-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix: using pnpm from corepack when install dependency #762
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Since package.json already has the packageManager field specified with pnpm and its specific version, there is no reason not to use it during whole dev/build process.
a938784
to
a6b8872
Compare
Updated, see above |
do we need to delete the lock file? |
Which lock file do you refer to? To provide more context for why I delete the yarn.lock, just pick a random dependency, say If you refering to the remaining pnpm-lock, it's the core of version management in nodejs environment and should always be included. |
This PR proposes multiple improvements to the usage of package manager.
npm install -g corepack
;packageManager
here, it is supposed all dependencie should be managed by the specified manager version. Avoid install pnpm manually in ci, just runcorepack enable
. Meanwhile, using two package manager with different resolve algorithm will never be a good idea, for whichyarn.lock
is removed;pnpm
,yarn
executable in the path, and automatically install the version mensioned inpackageManager
. These installation may also need a proxy or mirrors of npm registry in a limited network environment. I guess author of this PR exprience such cases(as he added proxy config for apt-get as well), and mistakely think it's caused by pnpm.I delete the commented proxy config as well, for users can add their own as needed
Remaining Work: Execution of pip and pnpm using a mirror, but apt-get don't. I wonder in which environment does this Dockfile supposed to be build, or people just adjust it themselves?Updated 2025.1.3: rebase upon master; add mirror config for apt-get