cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

Updated rhtml template?

Can anyone provide some guidance on building a basic rhtml visual?

 

I'm trying to upgrade one of my custom visuals from the 1.12.0 api to 2.2.2.  I'm ultimately trying to make the jump to v3.0, but am hoping that understanding how to adapt to v2.2 will make the jump to v3.0 easier.  Due to the ugly state of the custom visuals tutorials, I'm in over my head with trying to modify my existing files, so I'm trying to start again from scratch.  I've tried creating a barebones visual following https://github.com/Microsoft/PowerBI-visuals/blob/master/RVisualTutorial/CreateRHTML.md by running:

 

pbiviz new sampleRHTMLVisual -t rhtml
cd sampleRHTMLVisual
pbiviz package

 This then bombs out with:

PS C:\Users\foo\sampleRHTMLVisual> pbiviz package
 info   Building visual...
 info   Start preparing plugin template
(node:22948) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
 info   Finish preparing plugin template


 ERROR  Failed to compile with 1 errors                                                                                                                                                                         3:54:44 PM
 error  in C:\Users\foo\sampleRHTMLVisual\.tmp\precompile\visualPlugin.ts

[tsl] ERROR in C:\Users\foo\sampleRHTMLVisual\.tmp\precompile\visualPlugin.ts(1,10)
      TS2305: Module '"C:/Users/foo/sampleRHTMLVisual/src/visual"' has no exported member 'Visual'.

 info   Package created
PS C:\Users\foo\sampleRHTMLVisual> pbiviz info
 info   visual.name.................. sampleRHTMLVisual
 info   visual.displayName........... sampleRHTMLVisual
 info   visual.guid.................. sampleRHTMLVisualFD5DB360EB6347DAB2B06990D9A98AE1
 info   visual.visualClassName....... Visual
 info   visual.version............... 1.0.0
 info   visual.description...........
 info   visual.supportUrl............
 info   visual.gitHubUrl.............
 info   apiVersion................... 2.2.0
 info   author.name..................
 info   author.email.................
 info   assets.icon.................. assets/icon.png
 info   style........................ style/visual.less
 info   capabilities................. capabilities.json
 info   dependencies................. dependencies.json
 info   stringResources.............. []

 

3 REPLIES 3
v-evelk
Microsoft
Microsoft

Hello,

 

Probably, you should update Node,js or/and Typescript package.

 

Kind Regards!

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

Anonymous
Not applicable

I've updated node and TypeScript, but the problem lies within powerbi-visuals-tools@beta (3.0.12).  I'm able to get the stock visual template to compile and load into Power BI, but I have yet to find a way to get any custom R visuals to render and the rhtml template fails to compile with the provided tools.

Could you please share a source code?

I can try to build and figure out what is wrong.

 

If you can provide a source code, please send a link or files to pbicvsupport@microsoft.com

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors