It seems that the specified Electron version in the ‘package.json’ cannot be found. Despite trying to install ‘electron@6.1’ as suggested in the readme, we encounter the same issue.
Upon further investigation, I checked the latest Electron version on npm, which is v26.2.2. I decided to update to this version, and the packages are successfully installed. However, the ‘exportToPDF’ service no longer works, and it displays the following error:
Error: Script failed to execute, which normally indicates an error was thrown. Please check the renderer console for the error.
at node:electron/js2c/renderer_init:2:16978
at EventEmitter.<anonymous> (node:electron/js2c/renderer_init:2:11167)
at EventEmitter.emit (node:events:513:28)
at Object.onMessage (node:electron/js2c/renderer_init:2:9240)
(Use 'Electron --trace-warnings ...' to locate where the warning was generated)
Upon debugging, I suspect that the newer version of Electron may be causing an issue in ‘gantt/pdf/electron-template.js’ due to the following code:
Hello,
Unfortunately, I couldn’t reproduce the issue on my computer. When I install the modules, I have the 8.2.5 version, and it is possible to download that version from Github or NPM:
Could you clarify the operating system and device you are using? Is it OSX with the M1 processor?
At the time Electron 8 was released, the Darwin-ARM64 architecture didn’t exist. It is the same with the older versions, and if you don’t use Windows, you don’t need to install versions older than 8.
The newer Electron versions removed the way to load external scripts that we need to evaluate the page sizes, so if you try to install them, it will not work.
I will inform the dev team about that issue, and they will investigate if there is a way to upgrade the code to the newer versions of Electron.
Hello,
Thank you for the clarification.
I checked that Electron 11 still works for exporting PDF files, while the 12th version doesn’t work.
The release note says they added the darwin arm64 builds as an experimental feature: https://releases.electronjs.org/release/v11.0.0
So, you can try installing that version and check if it works on your computer:
npm install electron@11
Regarding the issue with the g++-multilib package, it can be that the package is not ported to that architecture. Unfortunately, I don’t have a Mac computer with that architecture, so I cannot suggest what actually you need to do.
The current Dockerfile uses node.js 14 which is based on Debian 9. You can experiment with different versions of the base image in the Docker package.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan