I am trying to do a homework for a mongodb uni course. They gave us some files, instructions are:
run npm install mongodb then node app.js<
NPM has created a node_modules directory at '/home/jasonshark/' path.
From your question it looks like you wanted node_modules to be created in the current directory.
For that,
mkdir cd npm init This will create package.json file at current pathOpen package.json & fill it something like below
{
"name": "project-name",
"version": "project-version",
"dependencies": {
"mongodb": "*"
}
}
Now do : npm install OR npm update
Now it will create node_modules directory under folder 'project-name' you created.