Issues with Node & Express app in PhpStorm
I can create a new express app from my console and it will run with no issues but when I try to create a project using the Node + Express choice I get the error: Error creating Node.js Express App. Wrong express generator
Also when I take an express app that launched in my console fine and load it in PhpStorm or WebStorm it will close right away with exit code 0 or 'process disconnected unexpectedly'
I am running OSX Mavericks, PhpStorm 7.1 & WebStorm 8 (i've tried it in both) but with no luck
Please sign in to leave a comment.
1. WebStorm tries to execute node_modules\express\bin\express to generate application, but this binary has been removed in 4.0. (moved to express-generator), so generation fails. I suggest choosing Express version 3.5.1 as a workaround.
The issue is tracked as http://youtrack.jetbrains.com/issue/WEB-11823, it's fixed in WebStorm 8.0.2
2. Does the problem occur when running the code, or when debugging it? What Node version do you work with?
It occurs in debug or when trying to run the app
running: v0.10.22
and thanks for the reply that makes sense because I have the latest version of express and express generator installed
How do you run your express application? The way to run it has changed in v.4 (see http://stackoverflow.com/questions/22215592/default-node-js-express-js-does-not-run)
Correct run configuration for WebStorm looks as follows:
javascript file: bin\www
environment variables: DEBUG=my-application
Thanks very much for your help got it all figured out now