TextEditor is not a constructor


#1

Hello !

I actually develop a package to generate React Component inside Atom.
In dev mode atom --dev it works perfectly but in “normal” mode, I have this issue

_atom.TextEditor is not a constructor

This issue comes from this part of the code

'use babel';

import { File, TextEditor } from 'atom';
// others imports

class ReactGeneratr {
  constructor() {
    // HERE IT IS
    this.editor = new TextEditor({ mini: true });
    this.editor.element.addEventListener('blur', this.close);
    this.editor.element.addEventListener('keydown', this.handleInsert);
    ...

Is the TextEditor only available in dev mode ?
I don’t think because the go-to-line package is using it and it works perfectly in normal or dev.