简体   繁体   中英

Into which folder does npm install installs

I installed an application via npm install and I can open the application in my webbrowser via http://localhost:3000/without any problem. What folder do I have to open to see what is displayed when I open the URL http://localhost:3000/ in my webbrowser?

by default npm install will install packages into node_modules which resides in your project root where package.json is located.
It seems you have a script which will spin up a webserver, in most cases it will not expose the node_modules directory on that webserver (for good reason).

The point is that you should be including the packages you installed within the script you use for your application that is served.

edit: you can read up on how to use nodejs packages here: https://docs.npmjs.com/using-npm-packages-in-your-projects

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM