@silemanbed,
Importing canvasjs.min.js file to the project as import * as CanvasJS from '/path-to-canvasjs-file/canvasjs.min'
should work fine. Please take a look at this Sample Project.

If you are still facing the issue, please share sample project reproducing the issue you are facing over Google-Drive / Onedrive, so that we can run it locally at our end, understand the scenario better and help you out.
—
Vishwas R
Team CanvasJS