-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] install runs before preinstall on npm install #2883
Comments
The place to discuss new lifecycle events is the rfc process, and there is an issue where we have been discussing what this actual lifecycle event would need to be called: npm/rfcs#325 |
@wraithgar Thanks for pointing this out! I must say the having separate install script and action is massively confusing. Could this issue be reopened as a documentation issue and behaviour be clearly documented. For some reason I do not see this in v6? Was that intentional or a bug? Can this be noted as a breaking change! |
Clarifying the documentation is already a part of the RFC issue linked and is part of our backlog. |
@wraithgar Also how would one run a script before install action? |
There is currently no lifecycle event that runs before the install action itself. This is one of the things being discussed in the rfc issue npm/rfcs#325, and might even need to be a separate issue or rfc. If you have a proposal, please submit one. |
I need to think about this!!!! The behaviour I am observing seems different from what are being reported by others in these issues/rfcs.... |
I have upgraded from npm v6 to npm v7 (for the third time) and almost immediately hit this bug!
Current Behavior:
If specified, preinstall script runs after install on npm install.
Expected Behavior:
Preinstall script should run before install.
Steps To Reproduce:
Create a preinstall script in package.json
Run install
Environment:
The text was updated successfully, but these errors were encountered: