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

Error getting started #91

Open
edewit opened this issue Jul 6, 2021 · 10 comments
Open

Error getting started #91

edewit opened this issue Jul 6, 2021 · 10 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@edewit
Copy link

edewit commented Jul 6, 2021

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

Just added reaflow to my project and I get the following error in the console:

          <Canvas
            nodes={[
              {
                id: "1",
                text: "1",
              },
              {
                id: "2",
              },
              {
                id: "2-1-1",
                text: "2 > 2.1",
                parent: "2",
              },
              {
                id: "3",
                text: "3",
              },
            ]}
            edges={[
              {
                id: "1-2",
                from: "1",
                to: "2",
              },
              {
                id: "2-3",
                from: "2",
                to: "3",
              },
            ]}
          />
VM21084 react_devtools_backend.js:2560 Layout Error: ReferenceError: g is not defined
    at Emd (reaflow.js:19015)
    at Iqd (reaflow.js:19663)
    at h.dispatch (reaflow.js:19962)
    at h.saveDispatch (reaflow.js:19962)
    at reaflow.js:19963

Expected behavior

Seeing my simple diagram

Environment


Libs:
- "react": "^16.14.0",
- "reaflow": "^3.1.3",


Browser:
- [X] Chrome (desktop) version 91.0.4472.114 (Official Build) (64-bit)
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: v16.0.0  
- Platform:  Linux

Others:

@amcdnl
Copy link
Member

amcdnl commented Jul 6, 2021

Thanks for reporting. I've not seen this before and I use the library everyday. Could you make a simple github repo w/ the issue ( that will also help others getting started too! ).

@amcdnl amcdnl added bug Something isn't working need more info labels Jul 6, 2021
@amcdnl amcdnl self-assigned this Jul 6, 2021
@edewit
Copy link
Author

edewit commented Jul 6, 2021

@amcdnl it might be due to the fact I use snowpack, here is a repo to reproduce this issue

@amcdnl
Copy link
Member

amcdnl commented Jul 6, 2021

Ah - snowpack. I would bet thats it. I'm not very familiar with snowpack but I can take a look.

@joycollector
Copy link

Sam issue here using Vite2 (using esbuild same as in snowpack).

@edewit
Copy link
Author

edewit commented Aug 26, 2021

@joycollector right I think snowpack uses that as well

@amcdnl
Copy link
Member

amcdnl commented Aug 26, 2021

Anyone have any experience w/ snowpack that could shed some light? I poked around and I think its because elkjs runs in a webworker and thus the issue.

@amcdnl amcdnl added help wanted Extra attention is needed and removed need more info labels Aug 26, 2021
@leonbloy
Copy link

Same here with vite2

Seems to me related to kieler/elkjs#127

@diegonunes4
Copy link

diegonunes4 commented Aug 11, 2022

Hello is there a fix for this? I went to elkjs page and they say it gets solved on their new version, is it possible to bump to most recent version?

@SharonGrossman
Copy link
Contributor

SharonGrossman commented Sep 18, 2022

Hey there, it seems like bumping elkjs solves this issue, and this is still reproducing as of today, so can we get a bump to the newest version please? I can submit a PR if it's relevant

Edit: PR opened #181

@amcdnl
Copy link
Member

amcdnl commented Sep 19, 2022

@SharonGrossman - Merged and released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants