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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 10 | |
| 10 | |
| 4 | |
| 3 | |
| 3 |