Galooshi / atom-import-js

Atom plugin for ImportJS
MIT License
36 stars 3 forks source link

Uncaught TypeError: Cannot read property 'stripFileExtensions' of undefined #5

Closed TitanNano closed 7 years ago

TitanNano commented 8 years ago

[Enter steps to reproduce below:]

  1. lookupPath is "./"
  2. trying to import Application, one file at "./af/.travis/Application.js" takes care of tests, The file to import is at "./af/core/prototypes/Applications.js". If I rename "./af/.travis/Application.js" the import works without any problem.

Atom Version: 1.8.0 System: Mac OS X 10.11.5 Thrown From: atom-import-js package, v0.2.2

Stack Trace

Uncaught TypeError: Cannot read property 'stripFileExtensions' of undefined

At /Users/Jovan/.atom/packages/atom-import-js/node_modules/import-js/build/Configuration.js:216

TypeError: Cannot read property 'stripFileExtensions' of undefined
    at Configuration.get (/Users/Jovan/.atom/packages/atom-import-js/node_modules/import-js/build/Configuration.js:216:9)
    at /Users/Jovan/.atom/packages/atom-import-js/node_modules/import-js/build/findJsModulesFor.js:99:37
    at Array.forEach (native)
    at /Users/Jovan/.atom/packages/atom-import-js/node_modules/import-js/build/findJsModulesFor.js:88:64
    at Array.forEach (native)
    at findImportsFromLocalFiles (/Users/Jovan/.atom/packages/atom-import-js/node_modules/import-js/build/findJsModulesFor.js:87:29)
    at findJsModulesFor (/Users/Jovan/.atom/packages/atom-import-js/node_modules/import-js/build/findJsModulesFor.js:130:87)
    at Importer.findOneJsModule (/Users/Jovan/.atom/packages/atom-import-js/node_modules/import-js/build/Importer.js:278:54)
    at Importer._import (/Users/Jovan/.atom/packages/atom-import-js/node_modules/import-js/build/Importer.js:92:27)
    at inCurrentWorkingDirectory (/Users/Jovan/.atom/packages/atom-import-js/lib/import-js.js:122:70)
    at inCurrentWorkingDirectory (/Users/Jovan/.atom/packages/atom-import-js/lib/import-js.js:20:18)
    at importWord (/Users/Jovan/.atom/packages/atom-import-js/lib/import-js.js:122:18)
    at atom-workspace.subscriptions.add.atom.commands.add.import-js:import (/Users/Jovan/.atom/packages/atom-import-js/lib/import-js.js:159:33)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1106:28)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:340:25)
    at emitThree (events.js:97:13)
    at EventEmitter.emit (events.js:175:7)

Commands

     -8:29.1.0 import-js:fix-imports (atom-text-editor.editor.power-mode.is-focused)
     -8:20.3.0 import-js:import (atom-text-editor.editor.power-mode.is-focused)
     -8:15 import-js:goto (atom-text-editor.editor.power-mode.is-focused)
  2x -8:05.4.0 editor:newline (atom-text-editor.editor.power-mode.is-focused)
     -8:02.2.0 autocomplete-plus:confirm (atom-text-editor.editor.power-mode.is-focused.autocomplete-active)
     -7:58 core:move-down (atom-text-editor.editor.power-mode.is-focused.autocomplete-active)
     -7:57.7.0 autocomplete-plus:confirm (atom-text-editor.editor.power-mode.is-focused.autocomplete-active)
 12x -7:55.8.0 core:move-left (atom-text-editor.editor.power-mode.is-focused)
     -7:53.6.0 core:move-right (atom-text-editor.editor.power-mode.is-focused)
     -7:53.4.0 core:backspace (atom-text-editor.editor.power-mode.is-focused)
 11x -7:52.9.0 core:move-right (atom-text-editor.editor.power-mode.is-focused)
     -7:49 core:save (atom-text-editor.editor.power-mode.is-focused)
     -7:43.2.0 import-js:import (atom-text-editor.editor.power-mode.is-focused)
     -7:33.4.0 import-js:fix-imports (atom-text-editor.editor.power-mode.is-focused)
     -7:15.1.0 window:toggle-dev-tools (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  2x -6:20.9.0 import-js:import (atom-text-editor.editor.power-mode.is-focused)

Config

{
  "core": {
    "packagesWithKeymapsDisabled": [
      "project-ring"
    ]
  }
}

Installed Packages

# User
activate-power-mode, v0.5.2
atom-import-js, v0.2.2
atom-ternjs, v0.14.2
auto-indent, v0.5.0
build, v0.64.0
build-cargo, v0.15.0
build-grunt, v0.4.0
build-gulp, v0.11.0
busy, v0.5.0
color-picker, v2.1.1
css-color-underline, v1.0.1
docs-snippets, v0.8.0
emmet, v2.4.3
file-type-icons, v1.3.0
language-rust, v0.4.6
linter, v1.11.11
linter-csslint, v1.3.2
linter-eslint, v7.2.2
linter-jshint, v2.1.0
linter-jsonlint, v1.2.5
linter-perl, v0.8.0
linter-php, v1.2.0
linter-rust, v0.4.6
linter-sass-lint, v1.6.1
merge-conflicts, v1.4.4
project-ring, v0.39.0
racer, v0.20.0
travis-ci-status, v1.1.1

# Dev
No dev packages
trotzig commented 7 years ago

Sorry you never got a timely response to this issue. The latest version should potentially fix this bug.