Closed nielsvermaut closed 1 year ago
It seems Undici (one of the dependencies) isn't exposing the Request
object, which I suspect is due to an outdated version of NodeJS installed on your system.
Can you double check your Node version is 18 or greater? If it isn't, you'll need to update NodeJS using your system package manager, as the Tolgee CLI officially supports Node 18+ only.
Hi, I've checked my node version and confirmed that the installed node version is 19.
$ nvm exec 19.0 node -v
Running node v19.0.1 (npm v8.19.2)
v19.0.1
$ nvm exec 19.0 tolgee --api-url=REDACTED --api-key=REDACTED sync -p 4 translations/
Running node v19.0.1 (npm v8.19.2)
šā
Analyzing code...
š“ An unexpected error occurred while running the command.
š“ Please report this to our issue tracker: https://github.com/tolgee/tolgee-cli/issues
TypeError: fetch failed
at fetch (/usr/local/lib/node_modules/@tolgee/cli/node_modules/undici/index.js:113:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Requester.request (/usr/local/lib/node_modules/@tolgee/cli/dist/client/internal/requester.js:68:26)
at async Command.syncHandler (/usr/local/lib/node_modules/@tolgee/cli/dist/commands/sync/sync.js:47:24)
at async Command.parseAsync (/usr/local/lib/node_modules/@tolgee/cli/node_modules/commander/lib/command.js:935:5)
at async run (/usr/local/lib/node_modules/@tolgee/cli/dist/index.js:136:9)
As a extra precautionary step, I've reinstalled the cli globally, but this also yielded the same result.
The error is quite different this time: now, the error seems to indicate the fetch
calls fails to reach the target server at all, indicating whatever URL its trying to reach is unreachable (network error).
Can you please try and run the command again with verbose logging enabled (--verbose
), so the CLI will log more information about what's going on? It should log more information about the failing HTTP call for a better troubleshooting.
Hi there, it's been a while since the last update on this issue, so I'll close it as stale.
If you're still experiencing issues with the CLI, feel free to comment on this issue or drop a message on the community Slack.
Hi,
I've been trying to use the v1.0.0 version of the CLI but can't seem to get it to work. When I run the following commands I always seem to get exceptions for a dependency error.
I've installed the CLI via the npm today (16/02/2023 13:00GMT+2).
My "translations/" folder contains these files: https://gist.github.com/nielsvermaut/183cc776a1143e4665851cb7ed2d91a3
What could I be doing wrong or is this an actual bug?