First of all, a huge apology for the naive question, and if that sounds duplicate.
I want to install a package, for example material-ui , as an external dependency on another path, for example ./node_module/my-material-ui . The problem is that I cannot find any option to tell npm to do this, except for the --prefix option, which does not really help, because it installs the package under ./node_module/my-material-ui/node_modules/material-ui . Infact, this makes sense, since these are prefixes of the installation path. I searched, but did not immediately find a solution.
As a next question, instead of individually (and locally) installing the above package using npm install ... you want to specify where the package should be installed in package.json . In other words, how to achieve the specified goal is possible by indicating what is inside package.json .
Thank you in advance for your help and recommendations!
source share