Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
piotr_d
New Member

Embed Single Visual - error when size is not set

I'm trying to embed single visual using the documentation available on https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Single-Visual I want to display the visual in different divs of different sizes so it could adjust its size correctly. According to the page, the width and height params are optional - when left empty, the div's size should be used, which is exactly what I need. That however seems to not work in my case. When I specify width and height in the embed configuration, everyhting works correctly, but when I don't provide those values, the following exceptions are thrown in the browser console and no visual is shown on the page:

 

 

reportembed.externals.bundle.min.js:641 TypeError: Cannot read property 'fn' of undefined
    at e.requireSync (powerbiportal.dependencies.bundle.min.js:15)
    at Object.fn (powerbiportal.explore.bundle.min.js:26)
    at t.get (reportembed.common.bundle.min.js:59)
    at Object.lazyScopedSync (reportembed.common.bundle.min.js:59)
    at F.scaleVisualContainersToCanvas (powerbiportal.explore.bundle.min.js:32)
    at powerbiportal.explore.bundle.min.js:31
    at reportembed.externals.bundle.min.js:664
    at m.$digest (reportembed.externals.bundle.min.js:665)
    at reportembed.externals.bundle.min.js:668
    at e (reportembed.externals.bundle.min.js:565)

 

I'm using powerbi-client 2.6.5 installed via npm. It this a bug, or should I specify additional params to make it work without sepcifying the size?

 

0 REPLIES 0

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.