tststs / atom-ternjs

JavaScript code intelligence for atom with tern.js and autocomplete-plus
MIT License
627 stars 76 forks source link

ES6 modules not working correctly #304

Closed augustobmoura closed 4 years ago

augustobmoura commented 7 years ago

I'm importing the dependencies below:

import $ from 'jquery';

import angular from 'angular';

import __, { partial } from 'underscore';
import ErroUtilizacao from './util/ErroUtilizacao';
import AppSettings from './constants';
import onConfig from './on_config';
import onRun from './on_run';

.tern-project:

{
  "ecmaVersion": "7",
  "libs": [
    "browser",
    "underscore",
    "jquery"
  ],
  "loadEagerly": [],
  "dontLoad": [],
  "plugins": {
    "modules": {
      "dontLoad": "",
      "load": "",
      "modules": ""
    },
    "es_modules": {},
    "commonjs": {}
  }
}

When I hit the Jump to definition shortcut nothing happens and following error shows on console:

{id: "bb498f80-05b1-11e7-ade2-25c986085b7d", error: "TypeError: Cannot read property 'text' of undefined"}

Call stack:

(anonymous function)   @atom-ternjs-client.js:248
_tickCallback          @internal/process/next_tick.js:103
Promise.reject (async)
_tickCallback          @internal/process/next_tick.js:103
Promise.reject (async)
onWorkerMessage        @atom-ternjs-server.js:194
emitTwo                @events.js:106
emit                   @events.js:191
process.nextTick       @internal/child_process.js:744
_combinedTickCallback  @internal/process/next_tick.js:67
_tickCallback          @internal/process/next_tick.js:98
tststs commented 5 years ago

this is most likely an issue with tern itself. can you provide an example project/repo in which the issue occurs?

tststs commented 5 years ago

i also updated the tern dependency in the last update. the issue might me solved by that.

augustobmoura commented 4 years ago

I'm not using neither atom nor ternjs so I cannot test it, closing it now, if anybody else hits this issue please open a new one