question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Vue warn] : Class constructor Node cannot be invoked without 'new'

See original GitHub issue

Describe the bug Vue compiler complains when trying to follow any examples with custom extensions

Steps to Reproduce / Codesandbox Example Steps to reproduce the behavior:

  1. create Iframe.js in src/components/ directory using the code here
  2. add import Iframe from '../Iframe.js' in Vue component
  3. add new Iframe() under extensions in Tiptap Editor initialization

Expected behavior a new Extension class should be made available for import into the Tiptap instance

Screenshots n/a

Environment

  • OS: Mac OS 10.14.6
  • Browser : Chrome
  • Version: 86.0.4238.2
  • Desktop
  • Vue.js 2.6.10
  • “tiptap”: “^1.29.6”,
  • “tiptap-extensions”: “^1.32.5”,

Additional context Something tells me this has to do with eslint or babel config settings but I’m not sure where to start. that kind of config is a bit over my head. I’ve done some searching on how to enable ES6 classes in a Vue setup but couldn’t figure it out after trying for a couple hours. Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tobiasfuhlrothcommented, Sep 24, 2020

@madebycaliper @hanspagel I don’t think that @babel/preset-env is the key to the solution here, as @vue/cli-plugin-babel (given that you use vue-cli) already configures a project like that.

See https://github.com/ueberdosis/tiptap/issues/521#issuecomment-698250601 for the solution that worked for me.

0reactions
madebycalipercommented, Sep 24, 2020

@tobiasfuhlroth thanks for this. I’ll investigate when I have a chance 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

"TypeError: Class constructor Node cannot be invoked without ...
I think you can do the following to force tiptap to transpile. # vue.config.js transpileDependencies: [ /[\\/]node_modules[\\/]tiptap.*/ ],.
Read more >
Class constructor cannot be invoked without 'new' in TS
The "Class constructor cannot be invoked without new" error occurs when the target property in tsconfig.json is set to lower than es6 or...
Read more >
Angular script compilation: TypeError: Class constructor ...
TypeError : Class constructor MyScript cannot be invoked without 'new' at requireScriptForNodes (tools.ts:71) at attachScripts (tools.ts:220) ...
Read more >
TypeError: Class constructor Model cannot be invoked without
tsconfig.json { "compilerOptions": { "target": "es6" } }
Read more >
Class constructor SweetAlert cannot be invoked without 'new ...
Hi, After updating meteor version, I can not use the sweetalert2 npm package. import swal from 'sweetalert2'; import { TAPi18n } from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found