-
-
Notifications
You must be signed in to change notification settings - Fork 556
Closed
Labels
Description
Description
When trying to bundle a project with linux-x64-16.15.0 as a target, I get the following output:
> yarn nexe input.js -t linux-x64-16.15.0 --build --make="-j16" -o /tmp/output
ℹ nexe 4.0.0-beta.19
✔ Already downloaded...
✔ Finished in 0.039s
SyntaxError: Line 180, column 38: Unexpected token '?'
at constructError (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:5625:21)
at report (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:5664:7)
at parseAndClassifyIdentifier (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:5356:11)
at parsePrimaryExpression (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:3390:22)
at parseMemberExpression (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:3130:63)
at parseLeftHandSideExpression (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:3117:13)
at parseUpdateExpression (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:3055:26)
at parseUnaryExpression (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:3029:13)
at parseBinaryExpression (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:2950:72)
at parseConditionalExpression (/Users/mathieu.rousse/go/src/github.com/DataDog/synthetics-worker/node_modules/cherow/dist/umd/cherow.js:2920:20)
The input.js file contains a simple console.log:
console.log("Test")Expected output
I expect nexe to properly compile node and bundle the project.
Quick investigation
As it seems to be tied to cherow failing to parse a file, I followed the code, leading to cherow being used to load the node bootstrap file, and failing at this line: https://github.com/nodejs/node/blob/e24328201344d58044bd34710ae1479a644ffa6f/lib/internal/bootstrap/pre_execution.js#L180
I suppose cherow does not support the ??= syntax.
Reactions are currently unavailable