Package says installed, but does not Display in ‘Node.js and NPM'

re: WebStorm 2016.2 & 2016.3

re: Ubuntu 16.04


Create: Node.js Express App

Open: Settings > Languages & Frameworks > Node.js and NPM

Add button (+)

Available Packages

Select ‘regex’

Install

Dialog Says: “Package ‘regex’ installed successfully”

Close ‘Available Packages’ dialog

Press ‘OK’ button to close ‘Settings’ dialog

Open: Settings > Languages & Frameworks > Node.js and NPM

‘regex’ package NOT DISPLAYED!!!

Goto: ‘Project’ view

Open ‘node_modules’ folder

‘regex’ folder exists

QUESTION: Why does WebStorm say ‘regex’ package was installed ... BUT ... ‘regex’ does not display in ‘Node.js and NPM’ window??

QUESTION: Where is ‘regex’ package displayed ... so that I could, for instance, Delete it?

0
3 comments

Local modules are not displayed in the list unless they are added to 'dependencies' in your project package.json. When installing modules, make sure to specify --save option:

You can add your package to package.json manually:

"dependencies": {
"body-parser": "~1.15.1",
"cookie-parser": "~1.4.3",
"debug": "~2.2.0",
"express": "~4.13.4",
"jade": "~1.11.0",
"morgan": "~1.7.0",
"regex": "^0.1.1",
"serve-favicon": "~2.3.0"
}
0

Thank you.

Problem I had was that I had previously created an "Empty Project" (only way I could find to create JUST a Node.js prj) and in that case the Packages did display when added. So I thought that would be case when I created a "Node.js + Express" project.

So if wanted to DELETE a Package ... would either have to modify 'package.json' so it would be displayed ... OR, would it also work if I just Deleted the folder under 'node_modules'??

0

You can delete a folder, or run `npm uninstall <package_name>` (see https://docs.npmjs.com/getting-started/uninstalling-local-packages)

0

Please sign in to leave a comment.