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

add option to excludes ./node_modules when excuting 'corepack enable npm' #207

Closed
Soombra opened this issue Nov 4, 2022 · 1 comment
Closed

Comments

@Soombra
Copy link

Soombra commented Nov 4, 2022

we want to lock package manager in out project. so we run 'corepack enable & corepack enable npm' and add "packageManager":"[email protected]" in package.json file.
but, if some third part library has set a npm-script like: "postinstall": "npm run build", the installation will fail.
in my option, we should just lock the package manager for our own resource code. so, is there a way to exclude the 'node_modules' dir ?

@arcanis
Copy link
Contributor

arcanis commented Nov 4, 2022

Closing as duplicate with #57.

Generally, if a package lists npm run in its postinstall scripts, it's a real problem in the package that Corepack merely surfaces (calling the wrong package manager, even with "simple" commands like run, may not work in the best cases or silently corrupt the project in the worst).

@arcanis arcanis closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2022
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

No branches or pull requests

2 participants