"ReferenceError: Meteor not defined" in Webstorm 9?

Technically, I’m using PHPStorm, but I’ve installed the Node.js, Meteor, and Handlebars plugins. I set up the debug configuration, it has the meteor executable and I’m running the meteor server on localhost:3000. I also created this project using the Meteor app structure. It’s just the default hello app right now.

When I select Meteor in Debug Configurations, it won’t let me run the application. (Code hints still work though?) When I restart PHPStorm, it automatically selects Node.js for debugging.

But when I try running the application, I get this:

ReferenceError: Meteor is not defined
    at Object.<anonymous> (/home/laura/PhpstormProjects/twitter-music/hello.js:1:67)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Process finished with exit code 1

What’s going on? I’m on Linux Mint 17.2.

EDIT: I figured it out; I made a custom configuration using the default Meteor settings. Weird, but it worked. The live edit is SUPER slow though…

You don’t need webstorm’s live edit, ‘meteor run’ will detect all file changes, download requird packages and recompile, minify, concat and publish all changes (which is why it’s slow even for simple html changes). This should be changing in the 1.2 release

Yeah, I kind of/sort of got it working in Webstorm, but it’s REALLY slow. Like eight seconds slow. I can’t tell if this is Meteor’s live edit or Webstorm’s Meteor’s live edit, but I’m going to try turning off all client-side Meteor stuff in Webstorm, do meteor run myself, and go from there. I’m not sure if I can do a manual ‘meteor run’ and then use Webstorm to debug the same app though?

Nope, you have to create a debug in webstorm to hit server side breakpoints. The thing I find really annoying with this is you don’t get console errors when meteor fails to compile in webstorm. So you have to either stop the debug and do meteor run in the console or refresh your browser to see the compile time error.

Re the slowness, I haven’t tried webstorm’s live edit but because meteor triggers a recompile on all file edits (blank spaces included) you’ll always get the (10 secs for me) long refresh time. Even if live edit can refresh your html quickly, you’ll still get a double refresh when meteor finishes building. Especially for me since I’m using jade… this is why we’re holding out for 1.2