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

Cytoscape is giving error for undefined value #3

Open
kultigin opened this issue May 17, 2021 · 7 comments
Open

Cytoscape is giving error for undefined value #3

kultigin opened this issue May 17, 2021 · 7 comments

Comments

@kultigin
Copy link

I was trying cytoscpae-angular in StackBlitz. I injected the dependency which installed it's own dependencies, Cytoscape.js and primeng. Then I imported the CytoscapeAngularModule in the app.module.ts. I get this error

Unexpected value 'undefined' imported by the module 'CytoscapeAngularModule'
When I was importing all the modules of the project also, all the primeng modules are referred as undefined.

I tried even an older version of primeng but didn't work. What is the fix and which versions of dependencies should be used? a list will be helpful in the home page.

@michaelbushe
Copy link
Owner

I'll try to reproduce and update the docs as needed. Thank you.

@tabuckner
Copy link

I wonder if it's because the library doesnt declare primeng as a dependency (even a peer dependency). I think that's required for angular libraries built like this one w/ the CLI, right?

@michaelbushe
Copy link
Owner

michaelbushe commented Jul 27, 2021 via email

@kultigin
Copy link
Author

I have not yet actually we went back to using the javascript version.
I will separately try this though not sure I understood. Do you want me to try manually putting the folders?

@tabuckner
Copy link

Yes, that sounds right. Did you try the most recent version where you can just copy the /example directory? I’m hoping that simplifies things by moving it out of the multi-project.
On Tue, Jul 27, 2021 at 1:03 PM Taylor Buckner @.> wrote: I wonder if it's because the library doesnt declare primeng as a dependency (even a peer dependency). I think that's required for angular libraries built like this one w/ the CLI, right? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJB4RLEJRUATWZUHXSRNTTZ37HXANCNFSM45ALD2YA .
-- Mike Bushe @.
+1-508-625-1235

I think the changes needed to align this project w/ best practices for Angular libraries is pretty simple. The benefits are far outweighed by the improvements in Developer Experience from my viewpoint.

Are there other issues w/ the project that are better suited to the seed project approach you're describing?

@tabuckner
Copy link

(also clearly I'm interested in helping out 😅 )

@michaelbushe
Copy link
Owner

michaelbushe commented Jul 27, 2021

Both would be best.
A PR to align with best practices is very welcome. Thank you!
Yet, that still wouldn't give the best dev experience for most users (I suspect).

I think the audience - like many of my audiences in science - is not the expert Angular developer that knows all the best practices, how multi-module projects work, etc. I expect much of the audience for this library to be junior to middle Angular developers who just want to get productive as quickly as possible.

In, the earlier versions (pre-June, I guess) I asked the developer to copy the demo project that is part of a multi-project module. Because of the way Angular is set up, that wasn't easy, and harder when downstream dependencies changed (I'm look at you, primeng imports).

Now, in the latest version (0.8.12+), I expect this repo to make it dirt simple to create a new Angular project for cytoscape, even for new Angular developers. Dirt simple is reflected in the first lines of the README:
"To use, copy ./example-project and start coding."

Does this make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants