Gojs Error in SPFX

Iam using GoJs in my SPFX development . I import my gojs plugin as import * as go from ‘gojs’;

Iam getting the below error while running it in my local environment . Iam using typescript file.

Iam getting this error only after imorting gojs plugin

If you are not using UMD modules, but you are using ES6 modules, import the go-module.js or go.mjs (for Node.js) file. They are the same file.

I couldnt find the mjs file in my directory when i installed gojs.

Are you indeed using ES6 modules?
I suspect you are using a very old version of GoJS.

“gojs”: “^1.8.38”, this is the gojs version

We first started supporting JavaScript (ES6) modules in v2.0.

so if i update my plugin it will work fine right ?

Thanks

For most programmers the only real incompatibility they encounter is missing some predefined figures, which were removed to save space and are now only in the extensions*/Figures.js files.

Please read the end of the changelog for other incompatibilities:
https://gojs.net/latest/changelog.html