Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid API version #43

Open
LouisDeGeest opened this issue Nov 2, 2018 · 4 comments
Open

Invalid API version #43

LouisDeGeest opened this issue Nov 2, 2018 · 4 comments

Comments

@LouisDeGeest
Copy link

LouisDeGeest commented Nov 2, 2018

 info   Building visual...
 error  UNKNOWN TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at VisualPackage.join (path.js:503:7)
    at VisualPackage.buildPath (C:\Users\degeestl\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\lib\VisualPackage.js:115:26)
    at Promise (C:\Users\degeestl\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\lib\LessCompiler.js:53:42)
    at new Promise (<anonymous>)
    at Function.build (C:\Users\degeestl\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\lib\LessCompiler.js:52:16)
    at _validateApiVersion.then (C:\Users\degeestl\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\lib\VisualBuilder.js:100:38)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:667:11)

When first running the project, we get an error:

λ pbiviz start
 info   Building visual...
 error  VALIDATION   Invalid API Version v2.1.0

After doing a pbiviz update 2.1.0:

λ pbiviz update 2.1.0
 info   Visual api 2.1.0 updated

After running again:

λ 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.1.0/PowerBI-visuals.d.ts)

Then we update the tsconfig.json files as follows:

  "files": [
    ".api/v2.1.0/PowerBI-visuals.d.ts",
    "./src/visual.ts"
  ]

Finally we get the above mentioned error. This seems to be generated when building the package.

@destria2000
Copy link

Hi,

I'm encountering the same issue... can't seem to resolve it at this point.

@Kasibhatta
Copy link

I also encountered the same issue today. The only difference is that now the updated api version is 2.3.0. Other than that, exactly the same issue as reported by OP (LouisDeGeest). Would really love to find a solution to implement a zoom-in, zoom-out feature in this Visual.

@helen508light
Copy link
Contributor

helen508light commented Apr 22, 2019

@LouisDeGeest @destria2000 @Kasibhatta

Is thes problem still reproducable for you?
In general always it caused mismatch version in tsconfig and pbiviz files or wrong script call.
Please, use "npm i" then "npm run start" or "npm run package"(if you need) instead of "pbiviz start", "pbiviz package", because pbiviz version installed globally on you machine may be different with pbiviz version installed on the visual locally.

@helen508light
Copy link
Contributor

I had added your suggestion about a zoom-in and zoom-out features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants