-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 release
Description
npm install
fails when using nested local path modules
here an example git@github.com:marcellomontemagno/npm-test.git
here a description of the dependencies between modules
moduleA
ramda (remote)
moduleB
moduleA (local)
ramda (remote)
moduleC
moduleA (local)
moduleB (local)
ramda (remote)
Current Behavior:
Firs install of moduleC
completes succesfully, removing node_modules
and installing moduleC
again fails.
Removing the package-lock.json
works around the issue.
Expected Behavior:
npm install
to complete successfully
Steps To Reproduce:
git clone git@github.com:marcellomontemagno/npm-test.git
cd npm-test/moduleA
npm i
cd ../moduleB
npm i
cd ../moduleC
npm i
workaround
cd npm-test/moduleC
rm -rf node_modules
rm package-lock.json
npm i
notice that after the workaround
cd npm-test/moduleC
rm -rf node_modules
npm i
will fail again
Environment:
- OS: Mac OC Catalina 10.15.7
- Node: v12.10.0
- npm: 6.14.11
yancyknight, arieffikhrie and marcellomontemagno
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 release
Activity
yancyknight commentedon Feb 2, 2021
I'm having the same problem with the following package structure and environment.
Package Structure
moduleA
moduleB
moduleC
Environment (Same error on both)
OS: node:14-slim Docker image (Based on debian 9.13)
Node: v14.15.4
npm: 6.14.10
OS: CentOS 7
Node: v12.15.0
npm: 6.14.10
Error
Caused by running
npm install
in packageA.Removing
package-lock.json
makes the next install succeed for me as well, but subsequent installs fail again. Seems like it may be trying to install packageC twice at the same time and causing collisions?arieffikhrie commentedon Feb 2, 2021
I have same issue on the same structure.
It having an error when i try to
npm i
in package3 folderFor now, what ive done to make sure package-lock.json still can be commit in repo. I search inside package-lock.json for @myexample/package1, then make sure the version is using local path instead of version number
yancyknight commentedon Feb 3, 2021
I tried the workaround suggested by @arieffikhrie but it looks like all my versions were already pointed to "file:../package1" instead of "1.0.0" and it still breaks when doing a fresh install with no
node_modules
.darcyclarke commentedon Jun 2, 2021
npm
v6
is no longer in active development; We will continue to push security releases tov6
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