question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Designer] after upgrading the designer version, TypeError: this.hostContainer.getCurrentStyleSheet is not a function

See original GitHub issue

Problem 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:closed
  • Created 5 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
anna-dinglercommented, Apr 18, 2023

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];

0reactions
Neeraj-swarnkarcommented, May 16, 2023

@anna-dingler, you already helped me earlier, Could you please help me with this issue - https://github.com/microsoft/AdaptiveCards/issues/8319

Read more comments on GitHub >

github_iconTop Results From Across the Web

Must use import to load ES Module: swiper.esm.js #8319
[Designer] after upgrading the designer version, TypeError: this.hostContainer.getCurrentStyleSheet is not a function #8467.
Read more >
Angular Material v15 upgrade - failed: ts.getDecorators is ...
Im trying to upgrade a library and showcase project to Angular Material v15. No issues updating to Angular, but when I run ng...
Read more >
How to fix braintree javascript error "t.getVersion is not a ...
Am getting error TypeError: t.getVersion is not a function , i have searched only the solution i found was about using the upgraded...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found