Forum Discussion

gmmanfredi's avatar
gmmanfredi
Regular Visitor
4 years ago
Solved

Pbiviz start @ [email protected]

Hi

I am following this tutorial to create a custo visual https://github.com/xiaodongliang/forgeviewer_embed_in_powerbi_report
I recently came across an issue that's preventing me to complete the project.

First of all i completed once, but instead of installing [email protected] i installed "npm i -g powerbi-visuals-tools", and that led me to a visual that didn't show the forge viewer. So i restarted the process from the beginning.

(here The author says the 2.5.0 is the only version that works https://forge.autodesk.com/blog/embed-forge-viewer-inside-power-bi-report)

When i installed [email protected] i had to change my Node.js version from 14.17.6 to 10.8 because the first was not compatible.

What i did next was creating the enviroment following the microsoft tutorial 
npm i d3@^5.0.0 --save
npm i @types/d3@^5.0.0 --save
npm i [email protected] --save
npm i powerbi-visuals-api --save-dev (then tried even npm i [email protected])

Then , finally, i came across this issue when running "pbiviz start" in C:\Users\Gian Marco Manfredi\circlecard>

 

--- note: the issue is different depending on the Node.js i use:

---- version 14.17

info Building visual...
error LESS style/visual.less : The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined

the visual.less is

p {
    font-size: 20px;
    font-weight: bold;
    em {
        background: yellow;
        padding: 5px;
        
    }
}

and the pbiviz.json is

{
  "visual": {
    "name": "circleCard",
    "displayName": "CircleCard",
    "guid": "circleCardA2677EDA579643169880D5D3DF0E2A32",
    "visualClassName": "Visual",
    "version": "1.0.0",
    "description": "",
    "supportUrl": "",
    "gitHubUrl": ""
  },
  "apiVersion": "2.5.0",
  "author": {
    "name": "",
    "email": ""
  },
  "assets": {
    "icon": "assets/icon.png"
  },
  "externalJS": [
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.js"
  ],
  "style": "style/visual.less",
  "capabilities": "capabilities.json",
  "dependencies": "dependencies.json",
  "stringResources": []
}

---- version 10.3

 

I was wondering if the versions of d3@^5.0.0 @types/d3@^5.0.0 [email protected] npm i powerbi-visuals-api
were the ringht ones and if not which are the correct ones to use.

Any other suggestion wuold be useful and really appreciated.

Thank you in advantage

Gian Marco

3 Replies