Error with Angular 9 + dhtmlxSpreadsheet


#1

I am following the dhtmlxSpreadsheet Angular guide to the letter and getting the following error:

Uncaught TypeError: Cannot read property ‘setImmediate’ of undefined
at spreadsheet.min.js:12
at Object. (spreadsheet.min.js:12)
at Object. (spreadsheet.min.js:12)
at n (spreadsheet.min.js:12)
at Object. (spreadsheet.min.js:12)
at n (spreadsheet.min.js:12)
at Object. (spreadsheet.min.js:12)
at n (spreadsheet.min.js:12)
at Object. (spreadsheet.min.js:12)
at n (spreadsheet.min.js:12)
at spreadsheet.min.js:12
at spreadsheet.min.js:12
at push…/node_modules/dhx-spreadsheet/codebase/spreadsheet.min.js.dhx_legacy. (spreadsheet.min.js:12)
at Object…/node_modules/dhx-spreadsheet/codebase/spreadsheet.min.js (spreadsheet.min.js:12)
at webpack_require (bootstrap:79)
at Module…/src/app/spreadsheet/spreadsheet.component.ts (spreadsheet.component.ts:1)

I have seen this mentioned on other forums but have not seen an official response on how this might be resolved.


#2

Please, try to include the dhtmlxSpreadsheet sources in the index.html of your application and use it as a plain JS instead of using the import.
If the porblem still occurs for yiou please, provide a complete demo, where the problem could be reconstructed locally.