Skip to content

Commit 146ecb5

Browse files
authored
Update README.md
1 parent 1afc059 commit 146ecb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# npm-preinstall-bug
22
From node 15.0.0 npm install command executes preinstall script AFTER installing dependencies.
3+
34
to reproduce just clone this repo and run `npm install`
5+
46
the expected result is `preinstall` script in `package.json` to be executed BEFORE dependencies installation.
7+
58
the reality is - `preinstall` script will be executed AFTER dependencies installation.
9+
610
how can you check this - after executing `npm install` you will see that `node_modules` directory was deleted by `preinstall` script.
711

812
Note: mongodb is just an example dependencies. you can try with any other npm package as dependency.

0 commit comments

Comments
 (0)