You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In node.js one can use ** operator instead of Math.pow. i.e.
> 2**3
8
I tried it in a react component and next.js works fine in dev mode but next build fails badly with UglyfyJS Syntax errors.
SyntaxError: Unexpected token: operator (*) [bundles/pages/product.js:48689,76]
at /Users/dade/work/grocerest/grocerest-webapp/node_modules/next/dist/server/build/index.js:122:21
at /Users/dade/work/grocerest/grocerest-webapp/node_modules/webpack/lib/Compiler.js:256:15
at Compiler.emitRecords (/Users/dade/work/grocerest/grocerest-webapp/node_modules/webpack/lib/Compiler.js:351:37)
at /Users/dade/work/grocerest/grocerest-webapp/node_modules/webpack/lib/Compiler.js:249:12
at /Users/dade/work/grocerest/grocerest-webapp/node_modules/webpack/lib/Compiler.js:344:11
at next (/Users/dade/work/grocerest/grocerest-webapp/node_modules/tapable/lib/Tapable.js:154:11)
at Compiler.compiler.plugin (/Users/dade/work/grocerest/grocerest-webapp/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/Users/dade/work/grocerest/grocerest-webapp/node_modules/tapable/lib/Tapable.js:158:13)
at Compiler.afterEmit (/Users/dade/work/grocerest/grocerest-webapp/node_modules/webpack/lib/Compiler.js:341:8)
at Compiler.<anonymous> (/Users/dade/work/grocerest/grocerest-webapp/node_modules/webpack/lib/Compiler.js:336:14)
errors:
[ 'bundles/pages/product.js from UglifyJs\nSyntaxError: Unexpected token: operator (*) [bundles/pages/product.js:48689,76]',
...
My workaround was to use Math.pow(num1, num2) instead
The text was updated successfully, but these errors were encountered:
In node.js one can use
**
operator instead ofMath.pow
. i.e.I tried it in a react component and next.js works fine in dev mode but
next build
fails badly with UglyfyJS Syntax errors.My workaround was to use
Math.pow(num1, num2)
insteadThe text was updated successfully, but these errors were encountered: