PowerBI-visuals-ForceGraph icon indicating copy to clipboard operation
PowerBI-visuals-ForceGraph copied to clipboard

Invalid API version

Open LouisDeGeest opened this issue 7 years ago • 4 comments

 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.

LouisDeGeest avatar Nov 02 '18 13:11 LouisDeGeest

Hi,

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

destria2000 avatar Dec 07 '18 12:12 destria2000

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.

Kasibhatta avatar Feb 10 '19 17:02 Kasibhatta

@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 avatar Apr 22 '19 13:04 helen508light

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

helen508light avatar Apr 22 '19 13:04 helen508light