0

I am working with Electron 11.0.2, and I wanted to integrate the amcharts library into a program I was working on.

I created a test script loaded via the script tag on the html loaded into the Electron renderer process. The amcharts library was imported as documented:

import * as am5 from "@amcharts/amcharts5";
import * as am5xy from "@amcharts/amcharts5/xy";

but I got an error:

Uncaught TypeError: Failed to resolve module specifier "@amcharts/amcharts5". Relative references must start with either "/", "./", or "../".

I decided to bundle the module with webpack, so I created a webpack config and compiled the script and referenced the newly compiled script from loaded html. Then I got the error:

DevTools failed to load SourceMap: Could not parse content for file:///path/to/project_root/StepLineSeries.js.map: Unexpected end of JSON input

Even when I placed the StepLineSeries.js.map file (which was a file from the amcharts libray) into my project root, I got an unresponsive program.

Now I am out of options. The import syntax failed to work with Electron and the webpack bundle has issues I can't grapple with. What can I try next?

halfer
  • 19,824
  • 17
  • 99
  • 186
Eazicoding
  • 191
  • 9

0 Answers0