Skip to content

Unable to get sample code to work. #460

@damntourists

Description

@damntourists

I'm following examples on:
https://projectstorm.gitbook.io/react-diagrams/getting-started/using-the-library

First issue was installing @projectstorm/react-diagrams. I could not get any examples to run without npm install --save the following:

@emotion/core
@emotion/styled
@projectstorm/react-canvas-core
closest
mathjs
pathfinding

After installing those, I was able to start my react-app. Adding the following triggers an error:

    const engine = createEngine();

Error being:
TypeError: class constructors must be invoked with 'new'

It's expecting new createEngine(); but all example code and docs don't show use of new.

I'm curious if anyone else is experiencing this or if I perhaps installed this incorrectly or using this incorrectly?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions