[Vue warn] : Class constructor Node cannot be invoked without 'new'
See original GitHub issueDescribe the bug Vue compiler complains when trying to follow any examples with custom extensions
Steps to Reproduce / Codesandbox Example Steps to reproduce the behavior:
- create Iframe.js in
src/components/
directory using the code here - add
import Iframe from '../Iframe.js'
in Vue component - add
new Iframe()
underextensions
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:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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 usevue-cli
) already configures a project like that.See https://github.com/ueberdosis/tiptap/issues/521#issuecomment-698250601 for the solution that worked for me.
@tobiasfuhlroth thanks for this. I’ll investigate when I have a chance 👍