In my package.json, I have defined some dependencies and devDependencies. These install with "npm install" just fine. I was able to get Mocha tests to run, and "require('chai')" resolves as expected. However, WebStorm does not recognize symbols pulled in with require!
What I've done:
1. Added the "Node.js ... Core Modules" library and "Node.js Globals" libraries. That got "require" to finally resolve.
2. Created a library called "Node.js Dependencies for myproject." It points to my root node_modules folder.
Despite this, for code like this:
var expect = require('chai').expect;
I get the error:
"Unresolved variable expect."
How the heck do I get WebStorm to work with basic Node packaging? I know some big fans of WebStorm that do Node development, so surely there's got to be a non-annoying way to make this work.