Use package.json in root/parent folder


(Igor Pellegrini) #1

Hi,

I remember reading somewhere (an issue on the repo? here in the forum? :thinking:) that npm has some logic to retrieve and use the package.json in the topmost directory (if I run the installation from a sub-directory).

So, if I recall correctly, having something like

www/
 |- vendor/
 |  |- node_modules/
 |  |  |- libFoo/
 |  |     |_package.json
 |  |_package.json
 |_package.json

will use the package.json in the www directory for the npm install.

Where can I find the documentation of this behaviour?


(Atrian Wagner) #2

Hi @Pictor13,
I found this information here, under the second paragraph of the More Information header.


(system) closed #3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.