1
votes

I'm trying to create a custom Force Directed Graph using the source code on Github (PowerBI-visuals-ForceGraph) and following the tutorial available at creating-a-custom-visual. Unfortunately, when I try to start the custom visual using the "pbiviz start" command in PowershellI I get an error stating "Invalid API version v2.3.0".

The "circlecard" example project used in the tutorial, which also uses API version v2.3.0 in it's pbiviz.json file, works just fine. So I'm clueless as to what's causing this error. I'm very new to trying out custom visuals on Power BI so any help with this is greatly appreciated.

Thanks in advance!

2
Try pbiviz update and pbiviz start again - Ulug Toprak
Thanks @UlugToprak. That error has gone away now. However, I get another one PS C:\Users\VAsher\forceGraph> pbiviz start info Building visual... error VALIDATION The PowerBI-visuals.d.ts in your tsconfig.json must match the api version in pbiviz.json (expected: .api/v2.3.0/PowerBI-visuals.d.ts) - Chipmunk_da
I tried searching for file PowerBI-visuals.d.ts but it doesn't seem to exist.. - Chipmunk_da
Did you use the pbiviz update that time or npm run start as suggested by the other answer? - Ulug Toprak
I used npm run start first and that threw an error. Later when I saw your reply I used pbiviz update and pbiviz start. Would that have caused this new error? :( - Chipmunk_da

2 Answers

4
votes

Try npm install and then npm run start, that should work :)

0
votes

PowerBI-visuals-ForceGraph visual was converted to use the new version of powerbi-visuals-tools@beta

If you installed the tools as global by command:

npm i powerbi-visuals-tools --global

and run pbiviz start from global instance it will not work, because old tools doesn't support a new format of visual project.

npm run start - start powerbi-visuals-tools from local instance

specified in package.json of the visual: https://github.com/Microsoft/PowerBI-visuals-ForceGraph/blob/master/package.json#L71

You need to install beta version of tool as global or run npm run start to use the new tools