theia-ide / sprotty

A next-gen web-based graphics framework
Apache License 2.0
138 stars 23 forks source link

Unclear how to use sprotty as node dependency #227

Closed bjorncole closed 6 years ago

bjorncole commented 6 years ago

Good morning -

I have been experimenting with Sprotty as a take-off point for some model-based illustrations and examples for a few days. I started by making a copy of the Class diagram example and modifying it, modifying the import from paths to my file system. Using this approach, yarn builds and Webpack continue to work and incorporate modifications I make.

As soon as I try to transition to using Sprotty as a node module (adding to dependencies in package.json and redoing yarn), I cannot. The import from "sprotty" cannot find the module. Should I import under a different name? Is there a specific configuration setting needed to make it visible? Other imports like Inversify appear to be working correctly in my setup.

JanKoehnlein commented 6 years ago

A few things to check:

If that doesn't help, could you share some code to reproduce it?

bjorncole commented 6 years ago

Aha. It was the "sprotty/lib" that did the trick. I was simply using "sprotty" rather than "sprotty/lib."