WebStorm does not recognize globals from other packages in Meteor project

I'm working on a Meteor project and WebStorm seems to not recognize global variables / methods provided by my installed packages in /.meteor/packages.

The two packages that I'm using right now that are causing problems are Iron Router and jQuery. The code is fine because I can run the project in the browser and it works as expected.

Examples:

  • Highlights $ with the message "Unresolved function or method $()".
  • Highlights val() with the message "Unresolved function or method val()".
  • RouteController with the message "Unresolved variable or type RouteController".
  • Router with the message "Unresolved variable or type Router".

I could keep going but I think I provided enough examples.

Is there a problem with my configuration or something I can change so WebStorm recognizes these globals? It's annoying to have WebStorm highlight warnings when it is perfectly valid code.

My packages file:
# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-platform
autopublish
insecure
accounts-ui
iron:router
less
nemo64:bootstrap
accounts-password
3 comments
Comment actions Permalink

Please, check that folder '.meteor' is not excluded from the project.

0
Comment actions Permalink

Appears that /.meteor is not excluded but /.meteor/local is excluded.

Does this help answer your question? I'm new to WebStorm so there could be something else I need to check to verify the folder is not excluded.

Screenshot 2014-10-23 09.39.08.png

0
Comment actions Permalink

I see, thanks for details:)
Please try adding your packages as libraries: open your packages file in editor and click 'Import packages as libraries' link shown in upper right corner.

0

Please sign in to leave a comment.