-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Error when updating the last version #249
Comments
You need a polyfill https://forum.adonisjs.com/t/regeneratorruntime-is-not-defined-angular-6/2451 |
@Ni55aN I can't seem to get that working with npm, webpack and awesome-typescript-loader. Is there another way to include this? I have the same issue, how do I add the polyfill with the npm, webpack, awesome-typescript-combination? |
@Ni55aN My apologies, I seem to have added the babelpolyfill after the Rete import, now that I placed it in front of it it seems to do something: But that is not related to this problem. If I can't figure this one out I might make another issue on that. |
@blauwepiet you can import the polyfill package into your entry script import "@babel/polyfill"; or install this plugin |
@blauwepiet how do you import the Rete's plugins? |
@Ni55aN Like this:
|
There are some differences in import of plugins. Plugins that built with rete-cli@0.5.0 must be imported as follow: import ConnectionPlugin from 'rete-connection-plugin'; Older builds: import * as VueRenderPlugin from 'rete-vue-render-plugin'; |
@blauwepiet so latest version of VueRenderPlugin built using rete-cli@0.3.0. I'm going to build all plugins with latest CLI to provide all types of bundes (UMD, CommonJS and ESM) In other words: importing packages built via CLI below version 0.5.0 you always import the UMD module, so import * as Smth from 'rete-smth-plugin'; will return default export |
@Ni55aN now I import it as follows and everything seems to be importing correctly:
but now the rete node editor element has a height 0?
and this is the typescript source, made with the "how to get started" code in the docs:
|
@blauwepiet parent HTML element of |
I can't get anything to work... Fixed the height, nothing is showing. Tried the codepen examples, get errors all over the place of undefined variables. For example the data-flow codepen example:
Rete.control doesn't have a component variable where you put the vuenumcontrol in. And when I look at the source I also don't find this component variable in the Rete.control class:
I think I am missing a lot of details here? I'd love to give Rete a try because I see potential but I don't know where to start when the examples are not working and the documentation isn't very clear. |
@Ni55aN I now managed to get it running partially by filling in the blanks and defining the variables as any. But it only renders the nodes but not the control values because of this:
Sorry for my inexperience with this all but I thought I would've been able to build it all in Typescript without too much external components like Vue. How can I build these Vue templates? |
@blauwepiet to avoid this issue you should to compile Vue templates in runtime or use Vue.js loader for single file components (it is Vue.js specific trick) |
@Ni55aN thanks for the tip, that does take away the vue warning, but I still don't have any in and output fields in my nodes. Looks like Vue is still not building the templates. This is my typescript:
And this gives me the resulting node tree without ins and outputs: There are no errors or warnings, it just doesn't make any new html elements in the nodes which does happen in the codepen examples. |
This is what I get in the console:
|
@blauwepiet how do you build your project? |
I see duplicate logs |
npm packag.json, webpack conf and tsconfig are as follows: npm:
webpack conf:
tsconfig:
Sorry to bother you with all of this but I must say that this is the first time where I properly wanted to setup a js project so there might be something wrong in my setup but as far as I know it is setup correctly... I hope you can spot something off. |
Is it happens with previous versions of |
@Ni55aN just tried it with rete v1.0.4 and rete-vue-render-plugin 0.2.5 but it also doesn't work. How is the VueNumControl used in:
There is no reference in the rest of my code, is that handled by the rete-ue-render-plugin? Because in the example on the rete-vue-render-plugin npm package page the following example is given:
Which used the customnodecomponent and customcontrolcomponent and sets the this.data.render to 'vue', which isn't set in the flow-control codepen example? Which my code is made off. |
I have reproduced issue: |
Finally I have updated Vue dependency for renderer. import VueRenderPlugin from 'rete-vue-render-plugin';
import Vue from 'vue/dist/vue.esm'
const VueNumControl = Vue.component('num', {
template: ... |
Amazing! It works now, thanks a lot @Ni55aN! |
how can i fix this error 'unable to resolve superclass rete.component' import Rete from "rete"; export class NumberComponent extends Rete.Component { builder(node) {
} worker(node) { |
@AMOSKERIO023 how do your build the app? |
I have the following error when I updated the latest version of the library:
core.js:17901 ERROR Error: Uncaught (in promise): ReferenceError: regeneratorRuntime is not defined
ReferenceError: regeneratorRuntime is not defined
at rete.esm.js:595
at rete.esm.js:612
at Module../node_modules/rete/build/rete.esm.js (rete.esm.js:682)
at webpack_require (bootstrap:83)
at Module../src/app/workflows/views/version/rete/components/dev-ops-component-view.ts (dev-ops-component-view.ts:1)
at webpack_require (bootstrap:83)
at Module../src/app/workflows/views/version/workflow-version.component.ts (workflows-workflows-module.js:65073)
at webpack_require (bootstrap:83)
at Module../src/app/workflows/views/index.ts (index.ts:1)
at webpack_require (bootstrap:83)
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:19821)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
I am using it with angular 7, es6. Do you have any suggestions ?
The text was updated successfully, but these errors were encountered: