Forum Discussion
API issue creating pbiviz package
- 1 year ago
Hi E3_DLC
If you want to use an API version lower than 4.7.0, you will either need to:
- Use the version of powerbi-visuals-tools included with the visual dependencies (from looking at package.json, v3.0.9, which, along with API 2.3.1, are both very old and no longer supported).
- If you're running pbiviz package to package the visual, you're likely using a globally installed version, which is too new to use the visual APIs it was designed with.
- Instead, try using npm run package, which will use the version of powerbi-visuals-tools local to the project.
- You should also do a similar workaround when developing (i.e., npm run start instead of pbiviz start)
- Migrate the visual code to use API >= 4.7.0. This is not ideal in the short term, but better if you are planning to do any kind of substantial work on this older visual, particularly if you want to add modern features, as many things have been introduced since API 2.3.1.
- If you have installed powerbi-visuals-tools globally and want to run this way, downgrade it to a suitable version that uses the older APIs, as the latest versions will only work with newer APIs.
- From looking at the changelog, major breaking changes were introduced in 3.3.0, so you may be able to get away with 3.2.2.
- You would install this using npm i -g [email protected]
Option #1 will probably be the lowest barrier to entry, but you will have significantly less problems, maintenance-wise, if you go for option #2, as there will be no support from MS if going with option #1 - they will likely tell you to migrate tools, API and codebase first before they can provide any specific assistance if you're having trouble.
Hopefully some of this will be useful. Good luck!
Daniel
- Use the version of powerbi-visuals-tools included with the visual dependencies (from looking at package.json, v3.0.9, which, along with API 2.3.1, are both very old and no longer supported).
Hi E3_DLC
If you want to use an API version lower than 4.7.0, you will either need to:
- Use the version of powerbi-visuals-tools included with the visual dependencies (from looking at package.json, v3.0.9, which, along with API 2.3.1, are both very old and no longer supported).
- If you're running pbiviz package to package the visual, you're likely using a globally installed version, which is too new to use the visual APIs it was designed with.
- Instead, try using npm run package, which will use the version of powerbi-visuals-tools local to the project.
- You should also do a similar workaround when developing (i.e., npm run start instead of pbiviz start)
- Migrate the visual code to use API >= 4.7.0. This is not ideal in the short term, but better if you are planning to do any kind of substantial work on this older visual, particularly if you want to add modern features, as many things have been introduced since API 2.3.1.
- If you have installed powerbi-visuals-tools globally and want to run this way, downgrade it to a suitable version that uses the older APIs, as the latest versions will only work with newer APIs.
- From looking at the changelog, major breaking changes were introduced in 3.3.0, so you may be able to get away with 3.2.2.
- You would install this using npm i -g [email protected]
Option #1 will probably be the lowest barrier to entry, but you will have significantly less problems, maintenance-wise, if you go for option #2, as there will be no support from MS if going with option #1 - they will likely tell you to migrate tools, API and codebase first before they can provide any specific assistance if you're having trouble.
Hopefully some of this will be useful. Good luck!
Daniel