Support #6250
closedSyntaxError: Unexpected token '='
0%
Description
Hi Team, Getting below error while running xslt3 from command line.
/usr/local/lib/node_modules/xslt3/node_modules/saxon-js/SaxonJS2N.js:4290 q("not a node"),Error.tg&&Error.tg(),q("wrong node kind "+p.nodeType)}const k=fc;a(E,"indent","boolean",!1);return d(u)}}}();const Td=function(){function a(r,g,e,n,y){e="xml"===e?g.fixed.gb:g.fixed.$b;g=g.fixed.hd;var u=e[r];if(!u||u instanceof H){u=g[r];if(!u){try{u=n()}catch(E){u=E}g[r]=u}u=y(u);e[r]=u}if(u instanceof H)throw u;return u}function b(r,g){g||="utf-8";r=void 0===r.Ob?r:r.Ob;if(g.startsWith("utf")&&0<=r.indexOf("\ufffd"))throw new H("External file contains non-Unicode characters","FOUT1190");return r}function h(r){if(0<=r.indexOf("\x00"))throw new H("External file contains non-XML characters","FOUT1190"); ^
SyntaxError: Unexpected token '=' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/usr/local/lib/node_modules/xslt3/xslt3.js:43:357) at Object. (/usr/local/lib/node_modules/xslt3/xslt3.js:93:95) at Module._compile (internal/modules/cjs/loader.js:999:30)
OS: Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-70-generic x86_64) Node Version: v12.22.9 NPM Version: 8.5.1 SaxonJS Versions tried: 2.3.0, 2.4.0, 2.5.0 & 2.6.0
Thank you for your support.
Updated by Martin Honnen about 1 year ago
I have seen similar errors with people upgrading to SaxonJS 2.6 but using a Node.js version that is too old; https://www.saxonica.com/saxon-js/documentation2/index.html#!changes for SaxonJS 2.6 clearly says "To run on Node.js, SaxonJS 2.6 now requires Node 18 or later".
Can you try with an updated Node.js and the current SaxonJS 2.6?
Updated by Norm Tovey-Walsh about 1 year ago
Trying Node.js v18 is my first suggestion as well.
Updated by Debbie Lockett 8 months ago
- Tracker changed from Bug to Support
- Status changed from New to Closed
I assume that the recommendation to update Node.js fixed the problem. So recategorising this as a support issue, and closing.
Please register to edit this issue
Also available in: Atom PDF Tracking page