tomkis / js-autoimport

atom autocomplete-plus provider which allows automatic ES6 modules
MIT License
18 stars 5 forks source link

Uncaught TypeError: Cannot read property 'push' of null #6

Open honzasusek opened 8 years ago

honzasusek commented 8 years ago

[Enter steps to reproduce below:]

  1. export const FOO = 'foo';
  2. try to import FOO

Atom Version: 1.2.4 System: Mac OS X 10.11.1 Thrown From: js-autoimport package, v0.5.1

Stack Trace

Uncaught TypeError: Cannot read property 'push' of null

At /Users/honzasusek/.atom/packages/js-autoimport/lib/imports/ImportRepository.js:97

TypeError: Cannot read property 'push' of null
    at /Users/honzasusek/.atom/packages/js-autoimport/lib/imports/ImportRepository.js:97:21
    at ImportRepository.pushSuggestedImport (/Users/honzasusek/.atom/packages/js-autoimport/lib/imports/ImportRepository.js:108:8)
    at AutoSuggestProvider.onDidInsertSuggestion (/Users/honzasusek/.atom/packages/js-autoimport/lib/autosuggest/AutoSuggestProvider.js:44:27)
    at AutocompleteManager.module.exports.AutocompleteManager.confirm (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:499:98)
    at /Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61
    at Emitter.module.exports.Emitter.emit (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
    at SuggestionList.module.exports.SuggestionList.confirm (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:135:27)
    at SuggestionList.confirm (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:3:61)
    at autocomplete-suggestion-list.SuggestionListElement.confirmSelection (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list-element.js:258:27)
    at Emitter.module.exports.Emitter.emit (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
    at SuggestionList.module.exports.SuggestionList.confirmSelection (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:139:27)
    at atom-text-editor.<anonymous> (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:533:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:99:36)
    at HTMLDocument.<anonymous> (/Users/honzasusek/Downloads/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -1:38.9.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -1:38.3.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
  2x -1:36.7.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -1:34.1.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -1:34.1.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -1:32.9.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
     -1:30 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -1:30 core:cancel (atom-text-editor.editor.mini.is-focused)
     -1:29.3.0 command-palette:toggle (atom-text-editor.editor.is-focused)
  3x -1:24.6.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -1:24 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:24 settings-view:install-packages-and-themes (atom-text-editor.editor)
     -1:19.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  3x -0:50.8.0 core:backspace (div.package-detail.panels-item)
     -0:03.0 core:move-down (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:02.6.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)

Config

{
  "core": {
    "audioBeep": false
  }
}

Installed Packages

# User
aligner, v0.17.1
autocomplete-paths, v1.0.2
block-selection-mode, v0.3.0
block-travel, v1.0.2
color-picker, v2.0.13
editorconfig, v1.2.2
js-autoimport, v0.5.1
js-refactor, v0.6.0
language-diff, v0.4.0
language-svg, v0.9.0
linter, v1.10.0
linter-eslint, v4.0.0
linter-jsonlint, v1.0.1
pigments, v0.18.1
project-manager, v2.6.5
react, v0.12.10
refactor, v0.6.0
sort-lines, v0.12.0
svg-preview, v0.6.1

# Dev
No dev packages
maxguzenski commented 8 years ago

+1

charrondev commented 8 years ago

+1