Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Mcburn
Helper II
Helper II

tsconfig.json exclude give TypeError

Hey @All

 

when i add this sample code in a new created project i got an error.

 

{
    "compilerOptions": {
        "module": "commonjs",
        "noImplicitAny": true,
        "removeComments": true,
        "preserveConstEnums": true,
        "outFile": "../../built/local/tsc.js",
        "sourceMap": true
    },
    "exclude": [
        "node_modules",
        "wwwroot"
    ]
}

This is the Error:

 info   Building visual...
 error  UNKNOWN TypeError: Cannot read property 'filter' of undefined
    at e (C:\Users\X180538\AppData\Roaming\npm\node_modules\powerbi-visuals-tool
s\lib\VisualBuilder.js:164:45)
    at VisualBuilder._validateApiVersion (C:\Users\X180538\AppData\Roaming\npm\n
ode_modules\powerbi-visuals-tools\lib\VisualBuilder.js:145:16)
    at VisualBuilder.build (C:\Users\X180538\AppData\Roaming\npm\node_modules\po
werbi-visuals-tools\lib\VisualBuilder.js:91:21)
    at VisualPackage.loadVisualPackage.then (C:\Users\X180538\AppData\Roaming\np
m\node_modules\powerbi-visuals-tools\bin\pbiviz-package.js:55:13)
    at process._tickCallback (internal/process/next_tick.js:103:7)
    at Module.runMain (module.js:592:11)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

Iám not sure where is the error. When i only use Files in tsconfig everything works fine. But i need to use exclude and includes for the scatterchart in PowerBI-visuals-core.

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Mcburn,

 

Looking at the code in powerbi-visuals-tools\lib\VisualBuilder.js, files seems to be necessary. And you may also reach out for help at github.

let apiDtsFiles = tsConfig.files.filter(i => i.match(/.api\/.+\/PowerBI-visuals.d.ts$/));

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Okay i should create a github issue. Maybe this is a good feature for the new pbiviz tool.

 

I think the line of code you post got an error. 

 

 

Thank you very much for your experiance.

 

Nice Regards

 

Mcburn

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.