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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

problem tooltip

Hi !

 

I'm trying to create a custom visual and i'm trying to put a tooltip in it. 

But I have a problem when I do the :

this.tooltipServiceWrapper = createTooltipServiceWrapper(this.host.tooltipService, options.element);

In the constructor of my class Visual implements IVisual, I have an error in the console and my visual crash, my error is :

Uncaught ReferenceError: regeneratorRuntime is not defined

And when I comment the line where I have a problem it works good.

 

I don't know how to solved it, someone can help me ?

Thanks in advance !

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Anonymous,

Run the following for your plugin's root folder:

 

npm i regenerator-runtime --save-dev

 

And then add the following at the top of your visual.ts, underneath import 'core-js/stable'; and before import '../style/visual.less';, e.g.:

 

...
import 'core-js/stable';
import 'regenerator-runtime/runtime'; /* Right here */
import '../style/visual.less';
...

 

If you re-run pbiviz start and re-check your visual, this error will go away as the necessary runtime is included in your build. Then, in the true spirit of coding it's onto the next error (but hopefully not) 🙂

Good luck!

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

2 REPLIES 2
dm-p
Super User
Super User

Hi @Anonymous,

Run the following for your plugin's root folder:

 

npm i regenerator-runtime --save-dev

 

And then add the following at the top of your visual.ts, underneath import 'core-js/stable'; and before import '../style/visual.less';, e.g.:

 

...
import 'core-js/stable';
import 'regenerator-runtime/runtime'; /* Right here */
import '../style/visual.less';
...

 

If you re-run pbiviz start and re-check your visual, this error will go away as the necessary runtime is included in your build. Then, in the true spirit of coding it's onto the next error (but hopefully not) 🙂

Good luck!

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Anonymous
Not applicable

It works ! Thanks a lot ! (I have another error now but i'm trying to fix it).  

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.