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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rdegr
Helper I
Helper I

I can "start" my visual successfully but get an error on "package"

As you can see below, "pbiviz start" gives no errors (and the developer control behaves as expected) but "pbiviz package" croaks on a JS file generated from my TS.

 

Worse, the line/column reported for the error are incorrect- line 586 of the generated file is

 

        }

 

and does not have 50 characters. No nearby line appears to have an = sign anywhere near column 50 either.

 

PS C:\Users\russell\Source\Workspaces\FloridaHealthFinder\PBI\fHFFilter> pbiviz package
info Building visual...
error UNKNOWN JS_Parse_Error {
message: 'Unexpected token operator «=», expected punc «,»',
filename:
'C:\\Users\\russell\\Source\\Workspaces\\FloridaHealthFinder\\PBI\\fHFFilter\\.tmp\\drop\\visual.js',
line: 586,
col: 50,
pos: 28609,
stack:
'Error\n at new JS_Parse_Error (eval at <anonymous> (C:\\Users\\russell\\AppData\\Roaming\\npm\\node_modules\\powe
rbi-visuals-tools\\node_modules\\uglify-js\\tools\\node.js:22:1), <anonymous>:1526:18)\n at js_error (eval at <anonym
ous> (C:\\Users\\russell\\AppData\\Roaming\\npm\\node_modules\\powerbi-visuals-tools\\node_modules\\uglify-js\\tools\\no
de.js:22:1), <anonymous>:1534:11)\n at croak (eval at <anonymous> (C:\\Users\\russell\\AppData\\Roaming\\npm\\node_mo
dules\\powerbi-visuals-tools\\node_modules\\uglify-js\\tools\\node.js:22:1), <anonymous>:2026:9)\n at token_error (ev
al at <anonymous> (C:\\Users\\russell\\AppData\\Roaming\\npm\\node_modules\\powerbi-visuals-tools\\node_modules\\uglify-
js\\tools\\node.js:22:1), <anonymous>:2034:9)\n at expect_token (eval at <anonymous> (C:\\Users\\russell\\AppData\\Ro
aming\\npm\\node_modules\\powerbi-visuals-tools\\node_modules\\uglify-js\\tools\\node.js:22:1), <anonymous>:2047:9)\n
at expect (eval at <anonymous> (C:\\Users\\russell\\AppData\\Roaming\\npm\\node_modules\\powerbi-visuals-tools\\node_mo
dules\\uglify-js\\tools\\node.js:22:1), <anonymous>:2050:36)\n at eval (eval at <anonymous> (C:\\Users\\russell\\AppD
ata\\Roaming\\npm\\node_modules\\powerbi-visuals-tools\\node_modules\\uglify-js\\tools\\node.js:22:1), <anonymous>:2315:
52)\n at function_ (eval at <anonymous> (C:\\Users\\russell\\AppData\\Roaming\\npm\\node_modules\\powerbi-visuals-too
ls\\node_modules\\uglify-js\\tools\\node.js:22:1), <anonymous>:2320:15)\n at eval (eval at <anonymous> (C:\\Users\\ru
ssell\\AppData\\Roaming\\npm\\node_modules\\powerbi-visuals-tools\\node_modules\\uglify-js\\tools\\node.js:22:1), <anony
mous>:2161:24)\n at eval (eval at <anonymous> (C:\\Users\\russell\\AppData\\Roaming\\npm\\node_modules\\powerbi-visua
ls-tools\\node_modules\\uglify-js\\tools\\node.js:22:1), <anonymous>:2073:24)' }
PS C:\Users\russell\Source\Workspaces\FloridaHealthFinder\PBI\fHFFilter> pbiviz start
info Building visual...
done build complete

info Starting server...
info Server listening on port 8080.

info Stopping server...
^CTerminate batch job (Y/N)? y
PS C:\Users\russell\Source\Workspaces\FloridaHealthFinder\PBI\fHFFilter>

2 ACCEPTED SOLUTIONS
rdegr
Helper I
Helper I

Figured this out, but may be of use to someone else.

 

I'd made a small change to an included JS file for an external component to have a way to disable a problematic behavior.

 

  function updateDisplay(control, omitChangeEvent = false) {

 

I edited to

 

  function updateDisplay(control, omitChangeEvent) {

 

which is functionally eqivalent since most calls omit the second arg and undefined and false both pass the

 

if (!omitChangeEvent) {
 
test

View solution in original post

v-viig
Community Champion
Community Champion

PBIVIZ tools do not support ES2015+ syntax that means you should make sure all of JS files are in ES5 or ES3.

Otherwise, JS code minification will fail.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

2 REPLIES 2
rdegr
Helper I
Helper I

Figured this out, but may be of use to someone else.

 

I'd made a small change to an included JS file for an external component to have a way to disable a problematic behavior.

 

  function updateDisplay(control, omitChangeEvent = false) {

 

I edited to

 

  function updateDisplay(control, omitChangeEvent) {

 

which is functionally eqivalent since most calls omit the second arg and undefined and false both pass the

 

if (!omitChangeEvent) {
 
test
v-viig
Community Champion
Community Champion

PBIVIZ tools do not support ES2015+ syntax that means you should make sure all of JS files are in ES5 or ES3.

Otherwise, JS code minification will fail.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.