-
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] Npm install with local dependency and package-lock.json throws error #1414
Comments
This looks like the same issue (not fixed) found in this old npm community post. I have the same issue. If you delete the package-lock.json file it works, but it's not the expected behavior (to delete the file each time) |
The accepted solution links to PR #86, so I wonder if this might be a regression of a previously fixed bug.
You can also fix the issue by removing the previously installed version of the package you are trying to install a local copy of: $ npm install ../my-package
# ERROR blah blah
$ rm -rf node_modules/my-package
$ npm install ../my-package
# SUCCESS! This only fixes the problem temporarily though. You'll have to jump through the same hoops next time you want to install the local version after having had the published version installed in-between. |
Thirded, this appears to have been fixed in #86, then again in #216 A relevant pull with test cases appears to have been closed in #254 Any way to get this fixed before NPMv7? Currently this is still broken on my 6.14.13:
The interesting thing is pkg-b/package.json exists in the installed modules:
EDIT: issue also referenced here, with some more digging: #529 |
@fkotsian npm 7 is out, and up to v7.10.0. can you try that and see if it fixes your issue? |
Thanks for the heads up! Let me give that a shot |
@ljharb Indeed it does!
Thanks for the word! |
npm If your bug is reproducible on 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. |
What / Why
I have a three npm project:
npm sample.zip
After running a script.ps1 I am getting error:
script just running npm install in sequence.
When
Whenever i running script in arhchive
Where
local npm dependency
How
There are a three projects with local dependency:
b project has a dependency on a project
c project has a dependency on a and b project.
if running npm first time - ok
but if removing all node_modules folders, and run npm install in sequence - c npm install crashes
Steps to Reproduce
Download and Extract archive
Run script.ps1
Expected Behavior
All installed without errors
Node version is v12.16.2
The text was updated successfully, but these errors were encountered: