How to extend and open TextEditorView programmatically?


I currently have a view that extends TextEditorView in order to take advantage of syntax highlighting and the gutter. I have an opener for the uri and uses to trigger the creation of the view. However, I have been getting errors such as,

TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
  at TypeError (native)
  at atom-pane.PaneElement.activeItemChanged (/Applications/
  at Emitter.module.exports.Emitter.emit (/Applications/
  at Pane.module.exports.Pane.setActiveItem (/Applications/
  at Pane.module.exports.Pane.activateItem (/Applications/
  at /Applications/
  at _fulfilled (/Applications/
  at self.promiseDispatch.done (/Applications/
  at Promise.promise.promiseDispatch (/Applications/
  at /Applications/
  at flush (/Applications/
  at process._tickCallback (node.js:378:11)

I have been playing around and digging through Atom source code for a while but wasn’t able to make any progress. I’m wondering if anyone has any idea and can help me out.

The package I’m referring to is coffee-compile.

Thanks in advance!


My guess is that it is expecting to find the class TextEditor but finding your class name instead.