[Designer] after upgrading the designer version, TypeError: this.hostContainer.getCurrentStyleSheet is not a function
See original GitHub issueProblem Description
Urgent Issue - [Designer] I have upgraded the designer version and it’s dependencies, screenshot added below for package.json changes. node version - v17.1.0 npm version - 8.4.1
Following this doc -> https://www.npmjs.com/package/adaptivecards-designer Earlier my project was working fine, but after upgrade it’s giving below-mentioned error.
npm install adaptivecards-designer adaptivecards adaptive-expressions adaptivecards-templating monaco-editor
npm install copy-webpack-plugin monaco-editor-webpack-plugin css-loader style-loader
TypeError: this.hostContainer.getCurrentStyleSheet is not a function
at CardDesigner.recreateDesignerSurface (card-designer.js:271:1)
at CardDesigner.attachTo (card-designer.js:1280:1)
at AdaptiveCardsDesigner.loadEditor (VM59339 AdaptiveCardsDesigner.js:233:16)
at AdaptiveCardsDesigner.loadEditor (react-hot-loader.development.js:717:1)
at eval (VM59339 AdaptiveCardsDesigner.js:168:15)
Added breakpoints in the code to see the object. Inside file node_modules/adaptivecards-designer/src/card-designer.ts
if (Utils.isAbsoluteUrl(this.hostContainer.getCurrentStyleSheet()))
Any help or pointers. Thanks.
Card JSON
nope
Screenshots
No response
Issue Analytics
- State:
- Created 5 months ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hi @Neeraj-swarnkar,
Which version are you upgrading to?
Also, did you trace which line is throwing the error?
My initial thought is that you should uncomment this line:
// ACDesigner.GlobalSettings.supportedTargetVersions = [Adaptive.Versions.v1_0, Adaptive.Versions.v1_1, Adaptive.Versions.v1_2];
@anna-dingler, you already helped me earlier, Could you please help me with this issue - https://github.com/microsoft/AdaptiveCards/issues/8319