Hi ,
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 powerbi-visuals-tools@1.11
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