You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How often does it reproduce? Is there a required condition?
Only happens for npm versions >= 9.4.2
No error for prior npm versions
What is the expected behavior? Why is that the expected behavior?
no error
What do you see instead?
Error: npm ls -prod -json -depth=1 failed with code 1
npm ls -prod -json -depth=1
npm ERR! code ELSPROBLEMS
npm ERR! missing: packages required by local npm package
Additional information
Our package.json file worked with npm 9 versions prior to 9.4.2, and broke in later versions. I read the change log and think that the install-links change to false in 9.4.2 is most relevant: npm/cli#6142
Let me explain more on how we manage packages and the errors we see in the version change from npm 9.4.1 to 9.4.2. We developed npm local packages and the package.json points to file:../package and the package version is defined in ../package/package.json, say 1.0.0.
npm i in 9.4.1 will install all the dependencies of the local package, npm ls -prod -json -depth=1 has no error and outputs the following
If I change package.json to "package": "1.0.0" instead of "package": "../package", then another npm i will resolve the error. But that is very not ideal as that will not work without the prior install, it will try to look for the local package in public npm repos and get 404 error.
What can I do to make npm i behave as in 9.4.1 in later versions?
The text was updated successfully, but these errors were encountered:
Version
19.8.1
Platform
Environment: darwin, node 19.8.1, framework 3.22.0 (local), plugin 6.2.3, SDK 4.3.2
Subsystem
serverless
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Only happens for npm versions >= 9.4.2
No error for prior npm versions
What is the expected behavior? Why is that the expected behavior?
no error
What do you see instead?
Additional information
Our package.json file worked with npm 9 versions prior to 9.4.2, and broke in later versions. I read the change log and think that the install-links change to false in 9.4.2 is most relevant: npm/cli#6142
Let me explain more on how we manage packages and the errors we see in the version change from npm 9.4.1 to 9.4.2. We developed npm local packages and the package.json points to
file:../package
and the package version is defined in../package/package.json
, say 1.0.0.npm i
in 9.4.1 will install all the dependencies of the local package,npm ls -prod -json -depth=1
has no error and outputs the followingin npm 9.4.2, we see the following after
npm i
As I understand the
install-links
flag was default to true prior to 9.4.2 so I triednpm i --install-links
in npm 9.4.2 and we see a different errorIf I change package.json to
"package": "1.0.0"
instead of"package": "../package"
, then anothernpm i
will resolve the error. But that is very not ideal as that will not work without the prior install, it will try to look for the local package in public npm repos and get 404 error.What can I do to make
npm i
behave as in 9.4.1 in later versions?The text was updated successfully, but these errors were encountered: