Node modules folder not showing. Any one knows why?

Hey, campers. :wave:
First of all, I would really appreciate the campers on here who are constantly trying their best to answer our questions . We see you guys and we really appreciate you. :pray:

Back to my question.

So, Iā€™m currently learning node js (Proud of how far Iā€™ve come though :smiley:) and to an extent, Iā€™m understanding the concepts. Now I want to start experimenting with what Iā€™ve learnt but on my local machine .
So, hereā€™s my problem.

Iā€™ve downloaded and installed node and it is evident in this screenshot( I use Windows OS)


Now, I created a working folder ā€œHELLO WORLDā€ and used the
npm init to create the ā€˜package.json fileā€™ as shown here

I went futher to install ā€˜Express.jsā€™ with the npm install express --save but it doesnā€™t reflect in my ā€˜package.jsonā€™ file.
Even when I run npm install to include the ā€˜node_modulesā€™ folder, it replies with

changed 1 package, and  audited 3 packages in 3s

found 0 vulnerabilities

but still doesnā€™t include the node_modules folder :point_down:


Soā€¦
I have tried using npm init but to no avail. It syill doesnā€™t show the node_modules. Iā€™ve checked all over stackoverflow too :laughing:. I really need help

Does anyone have an idea how to reflect the ā€˜expressā€™ package on my package.json file?
Does anyone also know how I can include the node_modules folder?


Thanks for the reply. Hereā€™s what I see
Nothing else

ls -la doesnā€™t seem to work on powershell and so, I tried it with bash

Oh boy!!.
Thatā€™s a lot of files and folders I got back
aa

It tried to zoom it down so you could see all the files and folders; cos itā€™s so long

aa

No such file or directory 

This was its response


Iā€™ve done it.
It still showed the same thing .
After I installed express with bash in vscode, it still doesnā€™t reflect in package.json file.
Even when i ran ls -al, i still couldnā€™t find the express folder

It showed me

changed 57 packages, and audited 58 packages in 10s

7 packages are looking for funding 
run "npm fund" for details

found 0 vulnerabilities
/c/Users/22963/desktop/hello world

This is the result

aa
Here it is.
Iā€™m using git bash to run the command

aa
No, Iā€™m not using WSL
After I ran npm install express, it still doesnā€™t reflect on my package.json file on vscode

aa

All the solutions youā€™ve given doesnā€™t seem to work for me.
After I deleted the package.json , ran npm init and ls -a. This is what I saw


Then, when i ran npm install express --save and then ran ls -a again, This is what I got but it still didnā€™t show a node_modules folder in my vscode

But I noticed that if I navigate to

This Pc/Local Disk(C:)/Program Files/nodejs

I can see a node_modules folder. Whyā€™s this so?
Hereā€™s a screenshot.

Thank you so so much RandelDawson :pray:. Although, the solutions you gave didnā€™t seem to work for me, I just appreciate the fact that you seemed interested in whatsoever question I was asking.
I finally got my problem resolved; what I did was to delete the node and npm folder and its contents on my system file. I then reinstalled node but this time I changed the destination path to be

C:\User\AppData\Roaming 

instead of

My PC\ Local Disk(C:)\Program Files

I hope this helps someone in the future :smiley:

Hello
Thank you so much for this, I had the exact same problem and your solution worked.
Thank you once again.

I have problem like you , it doesnā€™t appear node modules, but when iā€™m changed directory as youā€™ve recommend C:\User\AppData\Roaming , it my pc , it doesnā€™t have directory , so what should i do

Yeah, itā€™s not working for me too. I changed my directory of the installation and reinstalled it, but nothing seems to work.

for me above solution didnā€™t worked.
i install Node.js to

C:\User\AppData\Roaming 

but still node_modules folder missing from my project folder.

For me following changes worked.

Run following command to find the .npmrc file

npm config list

then open file name called ā€œ.npmrcā€
change ā€œlocation=globalā€ to ā€œlocation=projectā€ and save the file.

location=global

to

location=project

I hope this would help someone :grinning: