Arcath / jekyll-atom

A collection of tools and snippets for working with Jekyll in Atom
https://atom.io/packages/jekyll
MIT License
49 stars 19 forks source link

Uncaught TypeError: atom.packages.getActivePackage(...).mainModule.toggleServer is not a function #43

Closed DirtyF closed 8 years ago

DirtyF commented 8 years ago

Hi,

Can't get your package to work :

  1. Open Toolbar (displays Jekyll 0.0.0 in /path/to/jekyll/project/)
  2. Click on Start/Stop Server

Atom Version: 1.4.1 System: Mac OS X 10.11.2 Thrown From: jekyll package, v1.1.2

Stack Trace

Uncaught TypeError: atom.packages.getActivePackage(...).mainModule.toggleServer is not a function

At /Users/frank/.atom/packages/jekyll/lib/toolbar-view.coffee:82

TypeError: atom.packages.getActivePackage(...).mainModule.toggleServer is not a function
    at JekyllManagerView.module.exports.JekyllManagerView.toggleServer (/Users/frank/.atom/packages/jekyll/lib/toolbar-view.coffee:37:59)
    at HTMLButtonElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -3:14.6.0 jekyll:manage (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -3:10.8.0 tool-panel:unfocus (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -3:10.2.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -3:10.2.0 core:cancel (atom-text-editor.editor.is-focused)
     -2:57.9.0 jekyll:toolbar (atom-text-editor.editor.is-focused)
     -2:04.8.0 jekyll:open-config (atom-text-editor.editor.is-focused)
  7x -2:00.1.0 core:close (atom-text-editor.editor.is-focused)
     -1:52.4.0 jekyll:new-post (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-dark-syntax.theme-atom-dark-ui)
  2x -1:39.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
  2x -1:16.4.0 core:move-to-bottom (atom-text-editor.editor.is-focused)
     -1:15.8.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)
     -1:15.8.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:15.6.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)
     -1:15.6.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:14.8.0 core:save (atom-text-editor.editor.is-focused)
     -0:59.8.0 jekyll:open-data (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "Atom-Syntax-highlighting-for-Sass",
      "Atom-Syntax-highlighting-for-Sass"
    ],
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "jekyll": {
    "postsType": ".md",
    "serverPort": 4000
  }
}

Installed Packages

# User
editorconfig, v1.2.4
emmet, v2.4.1
jekyll, v1.1.2
language-liquid, v0.4.0
linter, v1.11.3
linter-htmlhint, v1.0.1
markdown-writer, v2.2.0
webbox-color, v0.5.9

# Dev
No dev packages
Arcath commented 8 years ago

I am in the process of removing the tool bar as it is pretty redundant now.

You can Start/Stop the server through Jekyll: Toggle Server or Alt-Shift-T

DirtyF commented 8 years ago

@Arcath thanks, upgraded to 1.1.3.

I still got a Jekyll binary incorrect error message when I don't start Atom from the command line.

❯ which jekyll
/Users/frank/.rbenv/shims/jekyll

I can't find where to change this in the Atom settings.

Arcath commented 8 years ago

If you go into Settings -> Packages -> Jekyll you will find Build Command there. For you it should be something along the lines of /users/frank/.rbenv/shims/jekyll, build.