Jatin Jatin - 3 months ago 11x
JSON Question

dependencies not showing in package.json in Node.js

I am new to node.js. I know when I install a new module in node.js using npm install it gets installed but in package.json i cant find the package name in dependencies. I know i can type it out but it should appear when i install it using command prompt it should appear. Here's my package.json file. `

"name": "mapfeedback-test",
"version": "1.0.0",
"description": "Map feedback Javascript Test library 1.0",
"main": "client.js",
"bin": {
"mapfeedback-test": "server.js"
"directories": {
"doc": "docs"
"dependencies": {},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
"repository": {
"type": "git",
"url": "ssh://jasharma@gerrit.it.here.com:29418/CommunityPlatform/testing/mapfeedback-test"
"author": "",
"license": "ISC",
"keywords": [] }

Please advice and let me know if I am wrong at something.

I use
npm install
command to install all the packages but its not showing in the dependencies.



Quickest way to fix this would be to run:

npm install <dependencies listed here> --save

And that should add them to the package.json