clientIO / joint

A proven SVG-based JavaScript diagramming library powering exceptional UIs
https://jointjs.com
Mozilla Public License 2.0
4.51k stars 842 forks source link

[Bug]: Angular 17, Builder Application or Esbuild, does not provide an export named "dia" #2470

Closed kaysgh closed 5 months ago

kaysgh commented 5 months ago

What happened?

Hello everyone,

We currently have an issue with JointJs+ and Angular 17. Since switching to builder application (or esbuild) which is based on Vite and ESM, we have this message which breaks our entire application during runtime (no build error):

Uncaught SyntaxError: The requested module '/app/@fs/E:/Sources/web/.angular/cache/17.0.5/vite/deps/@clientio_rappid.js?v=2a0901fb' does not provide an export named 'dia '

The import has not changed since many versions of JointJs and is like this: import { dia } from '@clientio/rappid';

It seems that the source code of this tutorial is still in v16 and builder browser and I have not found any more up to date and in esbuild/application:

https://resources.jointjs.com/tutorial/angular

Can you tell me if it is possible to use these builders and if so how? These bring quite a few improvements and certainly become the standard.

Thanks a lot for your help.

Version

3.2

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge, Opera

What operating system are you seeing the problem on?

Windows

kumilingus commented 5 months ago

Please see https://github.com/clientIO/joint/discussions/1961

kaysgh commented 5 months ago

Thank you very much for your quick and efficient help, after modifying the import as indicated everything seems to work as expected. I had searched way too far! Have a good day :)