mirego / accent

The first developer-oriented translation tool. True asynchronous flow between translators and your team.
https://www.accent.reviews
BSD 3-Clause "New" or "Revised" License
1.29k stars 97 forks source link

Can’t fetch the project on *** using accent-cli@0.15.0 #400

Closed ChiefORZ closed 10 months ago

ChiefORZ commented 10 months ago

Getting this error after updating to accent-cli@0.15.0 when executing accent sync. accent-cli@0.14.2 works perfectly fine.

Fetch config in accent.json... !
 ›   Error: Can’t fetch the project on ***
 ›   key ***
 ›   ***

Im using accent.json using apiUrl, apiKey and project:

{
  "apiUrl": "***",
  "apiKey": "***",
  "project": "***",
  "files": [
    {
      "namePattern": "parentDirectory",
      "format": "json",
      "source": "src/lang/*.json",
      "target": "%document_path%/synced/%slug%.json"
    }
  ]
}
ChiefORZ commented 10 months ago

running DEBUG=* accent sync shows me the stacktrace:

Fetch config in accent.json... !
Error: Can’t fetch the project on *** with key ***
    at ProjectFetcher.fetch (project/node_modules/.pnpm/accent-cli@0.15.0_@types+node@20.10.7_typescript@5.3.3/node_modules/accent-cli/lib/services/project-fetcher.js:18:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Sync.init (project/node_modules/.pnpm/accent-cli@0.15.0_@types+node@20.10.7_typescript@5.3.3/node_modules/accent-cli/lib/base.js:33:26)
    at async Sync._run (project/node_modules/.pnpm/@oclif+command@1.8.26_@oclif+config@1.18.9_supports-color@8.1.1/node_modules/@oclif/command/lib/command.js:42:13)
    at async Config.runCommand (project/node_modules/.pnpm/@oclif+config@1.18.9/node_modules/@oclif/config/lib/config.js:173:24)
    at async Main.run (project/node_modules/.pnpm/@oclif+command@1.8.26_@oclif+config@1.18.9_supports-color@8.1.1/node_modules/@oclif/command/lib/main.js:28:9)
    at async Main._run (project/node_modules/.pnpm/@oclif+command@1.8.26_@oclif+con
guyaumetremblay commented 10 months ago

@ChiefORZ I got the same error. For me, I had to update the version of Accent. Looks like a breaking change.

ChiefORZ commented 10 months ago

Updating the accent dashboard from 1.19.7 to 1.19.10 did it for me too. But would be nice if such breaking changes wouldn't be introduced in the first place :(