After running these 2 commands I still cant get node_modules folder
- npm init -y
- npm install
But when i download someone else project and run the same commands it creates node_modules folder.
Why is it like that? I’m stuck here for 3 weeks. Please help
Hi!
Can you show us the contents of your package.json please?
I have reset my laptop and tried again and still the same problem
Hey Daniel,
Thanks for asking about the package.json file
I have found a solution
{
“name”: “new-folder”,
“version”: “1.0.0”,
“description”: “”,
“main”: “server.js”,
“scripts”: {
“test”: “echo "Error: no test specified" && exit 1”,
“start”: “node server.js”
},
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“express”: “^4.17.1”
},
“devDependencies”: {
}
}
We need to add Express in dependencies, and then it will download the node_modules folder.
system
Closed
5
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.