ashthespy / Atom-LaTeX

The only LaTeX package you need for typesetting with Atom.
https://atom.io/packages/atom-latex
MIT License
22 stars 9 forks source link

Uncaught TypeError: Cannot read property 'view' of undefined #55

Closed antonbrams closed 7 years ago

antonbrams commented 7 years ago

[Enter steps to reproduce:]

  1. happens on build

Atom: 1.16.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.4 Thrown From: atom-latex package 0.7.6

Stack Trace

Uncaught TypeError: Cannot read property 'view' of undefined

At /Users/antonkluev/.atom/packages/atom-latex/lib/builder.coffee:20

TypeError: Cannot read property 'view' of undefined
    at Builder.module.exports.Builder.build (/packages/atom-latex/lib/builder.coffee:20:26)
    at HTMLElement.click (/packages/atom-latex/lib/view/panel.js:106:85)

Commands

     -6:41.5.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-ocean-dark-syntax.theme-conduit-ui)
     -6:38.6.0 command-palette:toggle (input.hidden-input)
     -6:37.1.0 core:confirm (input.hidden-input)
     -6:37.1.0 latex:build (input.hidden-input)
     -6:32.3.0 settings-view:open (input.hidden-input)
     -5:55.8.0 command-palette:toggle (input.hidden-input)
     -5:53.7.0 core:confirm (input.hidden-input)
     -5:53.7.0 latex:build (input.hidden-input)
     -3:01.9.0 core:confirm (input.hidden-input)
  4x -0:41.7.0 core:save (input.hidden-input)

Non-Core Packages

activate-power-mode 1.4.0 
android 0.1.0 
android-debugger 0.1.0 
animated-page-scroll 1.0.0 
atom-alignment 0.12.1 
atom-date-helpers 3.0.0 
atom-js-console 1.2.2 
atom-latex 0.7.6 
atom-terminal-tab 0.1.2 
autocomplete-paths 1.0.5 
coffee-refactor 0.7.0 
color-picker 2.2.5 
conduit-ui 0.1.3 
cpp-refactor 2.2.3 
file-icons 2.1.3 
git-time-machine 1.5.9 
intentions 1.1.2 
join-lines-smarter 2.0.1 
js-refactor 0.7.5 
json-level-color 0.1.4 
jumpy 3.1.3 
language-ini 1.19.0 
language-latex 1.0.0 
language-matlab 0.2.1 
latex 0.43.0 
linter 2.1.4 
linter-coffeescript 1.0.0 
linter-gcc 0.7.1 
linter-ui-default 1.2.3 
maximize-panes 0.2.0 
mixed-indent-warning 0.3.0 
multi-cursor-plus 1.2.0 
nord-atom-ui 0.11.0 
number-slider 1.0.1 
ocean-dark-syntax 0.2.3 
pigments 0.39.1 
project-plus 0.9.0 
refactor 0.11.4 
scroll-searcher 5.2.0 
set-indent 0.1.1 
set-syntax 0.3.2 
smart-tab-name 1.0.5 
snippets-editor 1.0.0 
sync-settings 0.8.1 
todo-show 1.11.0 
tree-view-autoresize 1.6.0 
vim-mode-plus 0.91.0 
vive-syntax 0.2.0 
ashthespy commented 7 years ago

Could you provide some more details as to your workflow? I can't seem to reproduce this error. Does it occur when you have multiple projects open?

antonbrams commented 7 years ago

i've just downloaded the plugin, opened the .tex file and run "build" it from the command palette :)

ashthespy commented 7 years ago

I just did some testing, I can't reproduce this error in my workflow, but running the package specs returns the same errors:

Atom-LaTeX
  Builder
    ::build
      it should execute all commands sequentially
        TypeError: Cannot read property 'view' of undefined
          at Builder.module.exports.Builder.build (file:///C:/Users/dev/.atom/dev/packages/Atom-LaTeX/lib/builder.coffee:21:26)
          at .<anonymous> (file:///C:/Users/Ash/.atom/dev/packages/atom-latex/spec/main-spec.coffee:144:27)
      it should open preview when ready if enabled
        TypeError: Cannot read property 'view' of undefined
          at Builder.module.exports.Builder.build (file:///C:/Users/dev/.atom/dev/packages/Atom-LaTeX/lib/builder.coffee:21:26)
          at .<anonymous> (file:///C:/Users/Ash/.atom/dev/packages/atom-latex/spec/main-spec.coffee:155:27)

Finished in 3.626 seconds
13 tests, 24 assertions, 2 failures, 0 skipped

Any ideas @James-Yu ? 😕

ashthespy commented 7 years ago

Updated the specs to load the status-bar package (f13c1489c6ca4d5d3fb965f2c7ca04ac21142e4e) and all is good.

@antonkluev: Do you still face this error after the first installation of the plugin? (i.e restarting Atom after the plugin first installs?)

Closing this - reopen if you feel the need!