We’re rewarding the question askers & reputations are being recalculated! Read more.
2 added 61 characters in body
source | link

Thanks to @Dmitry's comment above, I was able to resolve this issue by configuring the default plugins for Tern.

In the tern file from the repo under bin/tern, I edited the default plugins here:

var defaultConfig = {
  libs: [],
  loadEagerly: false,
  plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}},
  ecmaScript: true,
  ecmaVersion: 6,
  dependencyBudget: tern.defaultOptions.dependencyBudget
};

Where I changed the plugins property from plugins: {}, to plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}},.

Now tern-find-definition is working well!

 

I am still having an issue with andFurthermore, for the false-positive require statement being recognized as an error. I will update when, I find a fix..was able to correct this by running M-x customize group RET js2-mode and enabling Js2 Include Node Externs.

Thanks to @Dmitry's comment above, I was able to resolve this issue by configuring the default plugins for Tern.

In the tern file from the repo under bin/tern, I edited the default plugins here:

var defaultConfig = {
  libs: [],
  loadEagerly: false,
  plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}},
  ecmaScript: true,
  ecmaVersion: 6,
  dependencyBudget: tern.defaultOptions.dependencyBudget
};

Where I changed the plugins property from plugins: {}, to plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}},.

Now tern-find-definition is working well!

I am still having an issue with and require statement being recognized as an error. I will update when I find a fix...

Thanks to @Dmitry's comment above, I was able to resolve this issue by configuring the default plugins for Tern.

In the tern file from the repo under bin/tern, I edited the default plugins here:

var defaultConfig = {
  libs: [],
  loadEagerly: false,
  plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}},
  ecmaScript: true,
  ecmaVersion: 6,
  dependencyBudget: tern.defaultOptions.dependencyBudget
};

Where I changed the plugins property from plugins: {}, to plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}},.

Now tern-find-definition is working well!

 

Furthermore, for the false-positive require statement error, I was able to correct this by running M-x customize group RET js2-mode and enabling Js2 Include Node Externs.

1
source | link

Thanks to @Dmitry's comment above, I was able to resolve this issue by configuring the default plugins for Tern.

In the tern file from the repo under bin/tern, I edited the default plugins here:

var defaultConfig = {
  libs: [],
  loadEagerly: false,
  plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}},
  ecmaScript: true,
  ecmaVersion: 6,
  dependencyBudget: tern.defaultOptions.dependencyBudget
};

Where I changed the plugins property from plugins: {}, to plugins: {"commonjs":{}, "node":{}, "requirejs":{}, "node_resolve":{}},.

Now tern-find-definition is working well!

I am still having an issue with and require statement being recognized as an error. I will update when I find a fix...