-
Notifications
You must be signed in to change notification settings - Fork 83
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
npm i --global-style #124
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
Maybe I'm creating an issue in the wrong repository and real problem hides somewhere in dependencies. But I use
dependency-tree
as an entry point, so ... it looks like a good start.Let's imagine that we have the following directory layout:
I invoke dependency-tree with the following arguments:
And
index.js
requirespackage2
module. Which, respectively, requirespackage1
module. The folder wherepackage2
resides was initiated by the following command:npm i --global-style
, i.e. dependencies of modules frompackage.json
are put into localnode_modules
folders of each package. In other words - I want to maintain old-style node_modules directory layout (let's pretend that I like duplicates :) ), where each top-level module holds its modules with itself.And here is the problem. Top level directory () also contains
node_modules
withpackage1
. And when I receive output from dependency-tree I have something like this:NOT:
If I'm not mistaken this algorithm assumes the second variant (it starts to look at the nearest
node_modules
folder and traverses to the root of the file system).Am I wrong or something works not as expected? I have some checks after receiving list from dependency-tree. One of them is confirmation that common directory for all imports is
dist
folder. And this check started to fall when I tried to usenpm i
command insidedist
folder with--global-style
argument. Without it (whenpackage1
folder resides at the same level aspackage2
) all works as expected.Can you confirm that I'm wrong :) or help to resolve the issue?
Thanks in advance! CC: @mrjoelkemp
The text was updated successfully, but these errors were encountered: