Feridum / atom-html-templates

A simple extension for Atom.io to generate html5 templates with some other dependencies
MIT License
7 stars 11 forks source link

Uncaught TypeError: Cannot read property 'setText' of undefined #1

Open RaDeleon opened 8 years ago

RaDeleon commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.6.0 System: Mac OS X 10.11.4 Thrown From: atom-html-templates package, v0.1.0

Stack Trace

Uncaught TypeError: Cannot read property 'setText' of undefined

At /Users/adeleon/.atom/packages/atom-html-templates/lib/atom-html-templates.coffee:85

TypeError: Cannot read property 'setText' of undefined
    at Object.module.exports.AtomHtmlTemplates.toggle (/Users/adeleon/.atom/packages/atom-html-templates/lib/atom-html-templates.coffee:85:11)
    at atom-workspace.subscriptions.add.atom.commands.add.atom-html-templates:toggle (/Users/adeleon/.atom/packages/atom-html-templates/lib/atom-html-templates.coffee:17:94)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:183:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-li.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:139:19)
    at HTMLOListElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLOListElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -7:09.0 window:toggle-dev-tools (atom-text-editor.editor.is-focused)
     -6:29.5.0 welcome:show (atom-text-editor.editor.is-focused)
     -0:26.3.0 core:copy (div.package-readme.native-key-bindings)
     -0:13.5.0 command-palette:toggle (div.package-readme.native-key-bindings)
     -0:01.3.0 atom-html-templates:toggle (div.package-readme.native-key-bindings)

Config

{
  "core": {
    "projectHome": "/Volumes/\\#1\\ Mac\\ osx\\ 10.11.3\\ 240gb/CodeProjects/GitHub",
    "themes": [
      "one-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  }
}

Installed Packages

# User
atom-html-templates, v0.1.0
autocomplete-html-entities, v0.1.0
css-snippets, v0.9.0
css-spy, v0.5.1
language-html-snippetless, v0.44.1
minimap, v4.21.0
pigments, v0.24.5

# Dev
No dev packages
Feridum commented 8 years ago

I can't reproduce the error. I couldn't test it on Mac because i dont have it. If someone have also this error I will be gratefull for any more situations like this

coreyk commented 8 years ago

Also having this issue:

[Enter steps to reproduce below:]

  1. Packages menu > atom-html-templates > Toggle

Atom Version: 1.7.3 System: Mac OS X 10.11.4 Thrown From: atom-html-templates package, v0.1.0

Stack Trace

Uncaught TypeError: Cannot read property 'setText' of undefined

At /Users/coreyk/.atom/packages/atom-html-templates/lib/atom-html-templates.coffee:85

TypeError: Cannot read property 'setText' of undefined
    at Object.module.exports.AtomHtmlTemplates.toggle (/Users/coreyk/.atom/packages/atom-html-templates/lib/atom-html-templates.coffee:85:11)
    at atom-workspace.subscriptions.add.atom.commands.add.atom-html-templates:toggle (/Users/coreyk/.atom/packages/atom-html-templates/lib/atom-html-templates.coffee:17:94)
    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.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1100:28)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:314:25)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)

Commands

  2x -2:52.1.0 atom-html-templates:toggle (atom-pane.pane.active)

Config

{
  "core": {
    "customFileTypes": {
      "source.html": [
        "ss"
      ]
    },
    "disabledPackages": [
      "ember-snippets",
      "release-notes",
      "vim-mode",
      "block-comment-plus",
      "clipboard-plus",
      "ruby-test",
      "webbox-color",
      "editor-stats",
      "atom-html-preview",
      "w3c-validation",
      "rails-snippets",
      "autoclose-html",
      "atom-wrap-in-tag",
      "scroll-searcher",
      "linter-tidy",
      "symbol-gen",
      "symbols-tree-view",
      "autocomplete-php"
    ],
    "openEmptyEditorOnStart": false,
    "themes": [
      "one-dark-ui",
      "solarized-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-cli-diff, v1.3.0
atom-html-templates, v0.1.0
atom-silverstripe, v2.0.0
autocomplete-ruby, v0.1.0
color-picker, v2.1.1
css-comb, v2.4.3
css-snippets, v0.9.0
file-icons, v1.7.11
filesize, v0.4.2
fonts, v1.2.0
highlight-line, v0.11.1
highlight-selected, v0.11.2
html-entities, v0.4.0
jquery-snippets, v11.0.0
language-apache, v1.5.0
language-pgsql, v0.2.3
linter, v1.11.4
linter-csslint, v1.3.2
linter-jshint, v2.1.0
linter-rubocop, v0.4.7
merge-conflicts, v1.4.2
pigments, v0.26.3
pretty-json, v1.2.0
sinatra-snippets, v1.4.0
sync-settings, v0.7.2
wordcount, v2.6.0

# Dev
No dev packages
tolerious commented 8 years ago

meet the same problem.

KamalMicheal commented 7 years ago

+1

nanna-dk commented 7 years ago

Same here...

almai commented 6 years ago

It's an unhandled exception! It happens when you call atom-html-templates without specifying a template type beforehand. So create an index.html, write e.g. html and hit ctrl-alt-o. Then it should work.