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.
Back to my question.
So, I’m currently learning node js (Proud of how far I’ve come though ) 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
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
I have tried using
but to no avail. It syill doesn’t show the node_modules. I’ve checked all over stackoverflow too
. 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?
while in the
hello world folder, type
ls -al and show us what you see.
Thanks for the reply. Here’s what I see
ls -la doesn’t seem to work on powershell and so, I tried it with bash
That’s a lot of files and folders I got back
It tried to zoom it down so you could see all the files and folders; cos it’s so long
Try one more thing for me, since that list is so long.
ls -al ../node_modules
No such file or directory
This was its response
It appears you are using Powershell in VS Code and using some kind of bash shell outside of VS Code. Is that correct? Are you using WSL?
Where are you trying to run all the
npm install commands (without VS Terminal or bash shell)? Try doing all of your
npm install and other commands in the bash shell.
Change back to the
Hello World folder and type
npm install express and then type
ls -al to show what is in the folder after performing the install.
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
The problem is I can not see what folder you are in when you are using the terminal in VS Code. Make sure to type
pwd and show us what it displays at that terminal prompt.
Your screenshots are very confusing. I really need you to copy and paste the results of the following command into the forum (no screenshots).
This is the result
OK, do the same thing but take a screenshot, so I can see the shell you are in and what application you are in.
Here it is.
I’m using git bash to run the command
And if you run:
npm install express
Show the command and results in screenshot. Make sure to run them in the same shell you just typed
pwd. Are you using WSL?
No, I’m not using WSL
After I ran
npm install express, it still doesn’t reflect on my package.json file on vscode