Reputation: 1
we are trying to import @bokeh/bokehjs in angular 10 and 11 as below:
import * as Bokeh from '@bokeh/bokehjs';
However we are facing below issues while compiling. Compilation error
Error: node_modules/@bokeh/bokehjs/build/js/types/core/property_mixins.d.ts:115:30 - error TS1005: ']' expected.
115 [key in keyof T & string as ${P}_${key}
]: T[key];
~~
node_modules/@bokeh/bokehjs/build/js/types/core/property_mixins.d.ts:115:46 - error TS1005: ';' expected.
115 [key in keyof T & string as ${P}_${key}
]: T[key];
~
node_modules/@bokeh/bokehjs/build/js/types/core/property_mixins.d.ts:115:47 - error TS1128: Declaration or statement expected.
115 [key in keyof T & string as ${P}_${key}
]: T[key];
~
node_modules/@bokeh/bokehjs/build/js/types/core/property_mixins.d.ts:116:1 - error TS1128: Declaration or statement expected.
116 };
Below are the bokehjs and node version we are using
bokehjs: 2.3.2
node: 14.17.3
Could anyone please help us fix this and let us know if there is anything we need to do
Thanks
Upvotes: 0
Views: 155
Reputation: 1050
Try to import just the required file from the build subdirectory.
Example:
import * as Bokeh from '@bokeh/bokehjs/build/js/lib/embed';
Refer this. I solved my problem using this:
https://discourse.bokeh.org/t/using-bokehjs-in-an-angular-app/5787/7
Upvotes: 0