"not listed in package.json" , node.js while installing NTVS "not listed in package.json" , node.js while installing NTVS express express

"not listed in package.json" , node.js while installing NTVS


Open up command prompt and cd into the project directory (you can right-click the project in Solution Explorer and choose Open command prompt from here...).

Type npm init and fill in the fields when prompted (or hit Enter to take the default). The output should look something like this...

C:\Anthony\Demo\ExpressApp1\ExpressApp1>npm initThis utility will walk you through creating a package.json file.It only covers the most common items, and tries to guess sane defaults.See `npm help json` for definitive documentation on these fieldsand exactly what they do.Use `npm install <pkg> --save` afterwards to install a package andsave it as a dependency in the package.json file.Press ^C at any time to quit.name: (ExpressApp1)version: (0.0.0)description:entry point: (app.js)test command:git repository:keywords:author:license: (ISC)About to write to C:\Anthony\Demo\ExpressApp1\ExpressApp1\package.json:{  "name": "ExpressApp1",  "version": "0.0.0",  "description": "",  "main": "app.js",  "dependencies": {    "express": "~3.4.4",    "jade": "~1.1.5",    "stylus": "~0.42.2"  },  "devDependencies": {},  "scripts": {    "test": "echo \"Error: no test specified\" && exit 1"  },  "author": "",  "license": "ISC"}Is this ok? (yes)

If for some reason npm init doesn't work, you can save the following text into a file called package.json in the root of your project and update the values to match the packages in your project.

{  "name": "ExpressApp1",  "version": "0.0.0",  "description": "",  "main": "app.js",  "dependencies": {    "express": "~3.4.4",    "jade": "~1.1.5",    "stylus": "~0.42.2"  },  "devDependencies": {},  "scripts": {    "test": "echo \"Error: no test specified\" && exit 1"  },  "author": "",  "license": "ISC"}

A third option is to delete the npm_modules folder in the project. Then you can right click on the npm "folder" in Solution Explorer, select Manage npm modules..., and reinstall the packages. Installing them this way should create a package.json for you.