Cannot jump to definition in js2-mode or Tern
I am performing Nodejs development in emacs, but my environment seems incorrect. For example, when I run
ac-js2-jump-to-definition, I get "no jump location found" in the minibuffer. Also when I run 'tern-find-definition`, I get "No definition found.".
Here is a sample of code, where I am using the "jump-to-definition" function works in other environments like WebStorm:
But it does not work when I put the point over
someFunction() above and run
M-x ac-js2-jump-to-definition or
tern-find-definition. Also, when I run
require function in
require('auth')() above is selected and gives the message "Undeclared variable or function 'require'".