Angular9 - Uncaught TypeError: Cannot read property 'setImmediate' of undefined

Trying to use the DHX Spreadsheet and this is the issue i faced:

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 am unable to even load the project at all due to this error coming from the library.
Any solution to this?

Here’s my github link to the above mentioned issue:

P.S i have downloaded the trial version from dhx and somehow the “angular-widgets-master” project has errors and was unable to load at all for references.

2 Likes

Why you guys not provide support for above setImmediate issue? This issue arises for Grid & SpreadSheet also . This line (import {Grid as GridDHX} from “dhx-suite”) in angular 10 project gives Uncaught TypeError: Cannot read property ‘setImmediate’ of undefined suite.min.js:12

2 Likes

Please, try to include the spreadsheet sources in the index.html.
Also, in case of using the latest dhtmlxSprtedsheet build, where the ts typings are available you are also able to import the spreadsheet in your .ts file.
As for the grid you can check the demo here:
https://dhtmlx.com/docs/products/integrations/
it should work correctly in Angular.

1 Like

Hello @plze, @rkshirsagar,

We have fixed the reported problem with the undefined setImmediate in the new( 7.3.7 ) Suite release.

Warm regards,