Comments (13)
These all run after the actual installation of modules into node_modules, in order, with no internal actions happening in between
What's the point of any of the lifecycle hooks, besides postinstall, if they all run after install without doing anything in between?
from cli.
@trevor-scheer due to this bug we switched to yarn and it works without any issue.
They also answered the issues I opened, in less than one week :D.
from cli.
Can confirm the two are consistent now, at least in our case where a dependency is missing. The preinstall
script doesn't run in either case now if the installation of node_modules
fails. Totally unnecessary to clone and run this repo, but if you choose to, you can note the preinstall.js
script never runs (logging "hello") in either case of npm i
or npm ci
. This is not the case in npm@6
.
https://github.com/trevor-scheer/npm-preinstall-reproduction
This is documented clearly under npm ci
, but not under npm install
.
from cli.
Now some package cannot even be installed using npm ci because the library author does not use npm ci and this bug break the package install.
We cannot use npm ci on some of our project because of this.
from cli.
I believe these issues are the same bug: #454 & #452 .
from cli.
Same here, I do some clean-up (including node_modules) on preinstall
in development with npm install
. In our CI pipeline this is done via npm ci
which installs the dependencies, after that preinstall
is deleting the node_modules folder because of the wrong execution order.
from cli.
I'm also having this issue. I'm using npm install <folder>
to use my package in my integration tests, and that folder needs to be built before I run install. for now I'm just manually building it but I would like preinstall to handle this, or at least for there to be a "predownload" script or something
from cli.
We have a similar use case. We're building a package from rust to create a wasm/js package, which we'd like to then install via a file reference. With npm ci
, this build step doesn't happen until the error of a missing package has already failed the install.
from cli.
Sadly not an option for us but thanks for the quick response @Kuinox! Glad you found a way around it π
from cli.
npm v6
is no longer in active development; We will continue to push security releases to v6
at our team's discretion as-per our Support Policy.
If your bug is preproducible on v7
, please re-file this issue using our new issue template.
If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
Closing: This is an automated message.
from cli.
πthis bug got automatically closed for the second time.
from cli.
@Kuinox can you confirm that this is still an issue in npm 7?
from cli.
I can't, because I don't remember which conditions caused this issue.
from cli.
Related Issues (20)
- [BUG] `npm i` splits command line arguments incorrectly HOT 2
- [BUG] When using Docker image, installing package globally is hanging HOT 2
- [BUG] The `postinstall` script of dependencies fires before the `preinstall` script in package.json HOT 4
- [BUG] <title> HOT 1
- [BUG] When using the npm command in MacOS 15.0 Beta, the node icon appears in the Dock HOT 19
- G HOT 1
- [BUG] npm ci workspace broke node_modules
- [BUG] Ctrl+C / SIGINT propagation to child processes broken since 10.3.0 HOT 2
- [BUG] Npm progress bar is missing HOT 1
- [BUG] NPM LATEST VERSION Error
- [BUG] OpenBSD usage failure HOT 1
- corp-jones-damarcus:patch-1 HOT 1
- [BUG] `npm init` does not use locally installed version of given package. HOT 1
- https://github.com/npm/cli/commit/dbe7d983d184fb00c85f7b34839a123057029c8b HOT 2
- [DOCS] npm doesn't install the latest tagged version if engines are invalid HOT 6
- [BUG] npm dist-tag rm only removes the last recently deleted tag HOT 9
- [BUG] `npm publish --provenance` The default value `public` isn't used HOT 5
- [Enchancement] Check files that import the package before uninstalling HOT 1
- [BUG] npm docs with no pkgname arg returns undefined HOT 2
- [BUG] No README.md on npmjs ? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.