I have a main
project which depends on a package package1
in the local file store. package1
peer depends on express:
{
"name": "package1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"peerDependencies": {
"express": "^4.17.1"
}
}
In the folder of the main project I do
npm install ../packages/package1
With npm@6.x it installs package1 as a link in node_modules of the main project, as expected. It also gives me a warning, that a peer dependency is missing - as expected.
Now I use npm@7.17 for the same task. Either with --legacy-peer-deps
option or without. It installs package1 as a link in node_modules of the main project. But it does NOT install the peer dependency in the main package NOR does it give my a warning, that a peer dependency is missing.
I exepected either a warning (at least with -legacy-peer_deps
switched on) or express
installed in the main project. BTW, it also does not get installed in the node_modules of package1.
Any idea anybody? I'd appreciate it much.