Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: editorjs_1.default is not a constructor #752

Closed
sumitvairagar opened this issue Apr 30, 2019 · 3 comments
Closed

TypeError: editorjs_1.default is not a constructor #752

sumitvairagar opened this issue Apr 30, 2019 · 3 comments

Comments

@sumitvairagar
Copy link

sumitvairagar commented Apr 30, 2019

I am getting the above error when I try to create the EditorJs object. Here is my code

import EditorJs from "@editorjs/editorjs";

@Component({
  selector: 'jhi-editor',
  templateUrl: './editor.component.html',
  styles: []
})
export class EditorComponent implements OnInit {

  
  constructor() {
      let editor = new EditorJs({
        holderId: 'editorjs'
      }
    );
   }

  ngOnInit() {
  }

} ```
@sumitvairagar
Copy link
Author

It works if I import it this way.

const EditorJs = require('@editorjs/editorjs');

@neSpecc
Copy link
Member

neSpecc commented Jul 19, 2019

@sumitvairagar we can't reproduce the issue. Please, open the new one if it still occurs.

@pravin
Copy link

pravin commented Feb 4, 2023

I'm experiencing the same error. Using require makes it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants