Closed bjorncole closed 6 years ago
A few things to check:
node_modules/sprotty
populated?examples
folder is not published with the npm package. Maybe you're still referring to classes in there?sprotty
provides a big lib/index.ts
file. When consuming sprotty from npm, imports should look like this:
import {
RenderingContext,
SEdge,
SCompartment,
PolylineEdgeView,
Point,
toDegrees, IView, setAttr
} from "sprotty/lib"
If that doesn't help, could you share some code to reproduce it?
Aha. It was the "sprotty/lib" that did the trick. I was simply using "sprotty" rather than "sprotty/lib."
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.