jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.65k stars 722 forks source link

Module parse failed: Unexpected token (1:30710) with vue2 #293

Closed dvillaume closed 2 years ago

dvillaume commented 2 years ago

Hello,

i'm having problems while testing with vue2 (with the instructions from #263 (comment)).

I receive the following message :

` ERROR Failed to compile with 1 errors 13:27:30

error in ./node_modules/drawflow/dist/drawflow.min.js

Module parse failed: Unexpected token (1:30710)`

I did try to figure what can happen in this but could'nt catch it.

// Vue 2 let wrapper = new this.render({ parent: this.parent, render: h => h(this.noderegister[html].html, { props: this.noderegister[html].props }), ...this.noderegister[html].options }).$mount() //

May you advice me about this ?

Regards, David

jerosoler commented 2 years ago

Hi @dvillaume

Are you using drawflow like this?

import Vue from 'vue'

....

Vue.prototype.$df = new Drawflow(id, Vue, this);
dvillaume commented 2 years ago

Hello, Seems the error came from a badly initialzed project, everything is good with a brand new one. Thanks very much for your time and for this super project.