I was creating a project with the help of a video. I am writing the codes with VisualStudioCode. The following step in the terminal worked properly and the packet.json file was created;
npm init
Then the following command was run;
npm i bcryptjs body-parser cookie-parser cors dotenv express jsonwebtoken [email protected] morgan nodem
And the person I used from the video had both packet-lock.json and npm_modules directory. But I only got packet-lock.json.
Although I looked at similar threads, I don’t understand where the problem is. In the meantime, I uninstalled and reinstalled node.js and updated npm.
1
I solved the problem as follows;
npm config set prefix “node_modules”
npm install -g
Then node_modules was created.