When I run:
npm install my-app
The app is installed into node_modules/my-app/...
I also tried
npm install -g my-app
This is how you can install a module to your current directory:
npm i --prefix ./ my-app
As others have said, the proper way is to configure your project via package.json
package.json