Forum Discussion
need your expertise on Modifying custom visual
Hi Anonymous,
If you will have gone through the tutorial, this will be using v3.1 of the visuals SDK (tools) and v2.6 of the API and will indeed work.
There are two things to consider when cloning other project repositories:
- The dependencies in package.json - if these aren't installed, the project won't build, so if you've not run npm i, then do this first.
- The version of the SDK it's using. Very few custom visuals projects are up to date with this
From your output, it looks like that project is using 1.11 of the SDK, which is quite old now (> 2 years). At that time, the SDK/API was combined, so you'll need to install that version:
npm i -g [email protected]
Once that's installed, it's probably best to re-ensure that your project's dependencies are correct for this version, so run:
npm i
From the root folder of your project.
Because you've changed the version of the SDK, you'll need to regenerate your certificate and install it - this was 2 steps on older versions of the SDK:
pbiviz --create-cert
And then...
pbiviz --install-cert
You'll be prompted to install the certificate again as per the current tutorial.
At that point you should be able to run pbviz start as normal.
If you want to run that codebase on the latest SDK, you'll need to migrate the code from the older standards to the newer one, as the v3 tooling is much better but uses newer JavaScript standards. There are some instructions here for this, but it's not a small job. There used to be some documentation on this but looks like it was lost in the move to the newer doc site - you might be able to find a cache of it somewhere (I couldn't). For reference this was at https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/migrating-to-powerbi-visuals-tools-3-0/.
To minimise frustration in getting the code to build, I would suggest going down the path of sticking with the current version it's on and ensuring the tools/SDK matches (1.11).
One other thing to consider, is if you package that visual, because it already exists in the marketplace, you will need to change its guid in pbiviz.json to be different. Otherwise, Power BI will always load the published version from the marketplace when you import it. Here's some further reading on that (specifically the section titled Importing a Power BI visual from the AppSource marketplace).
Regards,
Daniel
Hi Folks,
I encountered a similar issue trying to upgrade pbiviz version from 1.12.0 to most recent.
To make a long story short, I realized that - no matter what I tried -
it became impossible to upgrade my existing pbiviz version above 1.12.0. I've searched for solution online with no success. [sigh...] All existing information seems to have vanished in the dust... well almost...
Still the following approach worked in my case and I felt like sharing it.
So the first thing I thought was maybe it woukd be good to do a bit of cleanup of all no longer desired version including the main located under:
C:\Users\<your_username>\AppData\Roaming\npm\node_modules\powerbI-visuals-toolsI then downloaded the following .zip solution code file from Github
https://github.com/Microsoft/PowerBI-visuals-tools#readme
unzipped the content and copied it under:
C:\Users\<your_username>\AppData\Roaming\npm\node_modules\I usually use git clone method but I prefered using zip in this case.
Then using Windows PowerShell console with Administrator rights, I then relocated under
the root of the new pasted powerbI-visuals-tools directory and ran
npm installThat did it and I was then able to run pbiviz method afterwards and get my upgraded version. Yeeeees!
RE: There are some instructions here for this, but it's not a small job. There used to be some documentation on
this but looks like it was lost in the move to the newer doc site - you might be able to find a cache of it somewhere
(I couldn't). For reference this was at https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/migrating-to-powerbi-visuals-tools-3-0....
You're absolutely right... but if you look closely when you click on the provided link, you'll see a first Web page untitled Migrating to powerbi-visuals-tools 3.x... displayed in a snap of a second before being redirected. Now that's interesting... I simply saved the link as html file and opened it in code editor, then removed all
JavaScript stuff and there it was.
Content may feel the content to be deprecated... still I felt it contained interesting infos...
Thanks for sharing Daniel 😉