ryanhex53 / gpt-po

command tool for translate po files by using openai api
69 stars 13 forks source link

SyntaxError: Unexpected token 'with' in the latest version #18

Closed sanzeeb3 closed 1 week ago

sanzeeb3 commented 1 week ago

This used to work fine. but we're getting this error now:

file:///C:/laragon/www/dev/wp-content/plugins/aawp/node_modules/gpt-po/lib/src/index.js:5
import pkg from "../package.json" with { type: "json" };
                                  ^^^^

SyntaxError: Unexpected token 'with'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
    at async link (internal/modules/esm/module_job.js:47:21)
ryanhex53 commented 1 week ago

In release 1.1.2, Node.js ought to be at version 18.x or higher.