Angular > TypeError: Cannot read properties of undefined (reading ‘setImmediate’)

Hi, I ran into the exact same error when importing the suite layout component (7.2.5) into an Angular 9 project. I solved it by declaring the dhx namespace in the view component:
import { Layout } from 'dhtmlx-suite/codebase/types/ts-layout';
declare const dhx: any
const layout: Layout = new dhx.Layout(<parent>,<config>)
In addition I added the suite.js into the scripts section in angular.json.
Hope this helps.

1 Like