[BUG] npm using the wrong package.json file from a parent folder #5216
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When trying to install packages using
npm install
or seeing the current directory usingnpm prefix
, npm display a parent directory also containing apackage.json
file.This seems to only happen with the exact
package.json
file I use for this project. I wasn't able to create a minimal reproductible folder structure.Expected Behavior
npm uses the current directory as expected.
Steps To Reproduce
± pwd
/home/gilcrt/Repositories/CCI/cci-packages/projects/cci-utils
± ls -l package.json
-rw-r--r-- 1 gilcrt gilcrt 1.2K Jul 25 17:12 package.json
± npm prefix
/home/gilcrt/Repositories/CCI/cci-packages
± cat package.json
I don't understand why the prefix isnt the current working directory as it should be.
Environment
The text was updated successfully, but these errors were encountered: