apostrophecms / random-words

Generate one or more common English words. Intended for use as sample text, for example generating random blog posts for testing
MIT License
249 stars 72 forks source link

Syntax error with release 1.3.0 #34

Closed NasibMansour closed 1 year ago

NasibMansour commented 1 year ago

const random = options?.seed ? new seedrandom(options.seed) : null; ^

SyntaxError: Unexpected token . at Module._compile (internal/modules/cjs/loader.js:760:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Module.require (internal/modules/cjs/loader.js:723:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (/opt/hostedtoolcache/node/11.15.0/x64/lib/node_modules/imp-central-impt-eaton/lib/util/TestSession.js:45:21) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) PID for log retrieval: 4988

boutell commented 1 year ago

You are using (a) an unsupported web browser (Microsoft does not support IE11), (b) an unsupported, unsafe version of Node (versions prior to Node 14 are unsupported and unsafe because they receive no security patches), or (c) an old version of a tool like Babel that doesn't know about the optional chaining operator.

Since there are no supported javascript environments that do not support ?., we don't consider it a backwards compatibility break to introduce its use at this point.

But I may be able to offer some suggestions if you can say more about your environment.

BTW Node 14 reaches end of live in April, and Node 16 in September, so my recommendation is to move to Node 18 if you can.