Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.