Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "path" argument must be of type string. Received undefined introduced in v1.14.4 #131

Open
codeflorist opened this issue Nov 14, 2024 · 1 comment

Comments

@codeflorist
Copy link

I'm using json-autotranslate with this call:

npx json-autotranslate --source-language en --directory-structure ngx-translate  --type key-based  --decode-escapes --delete-unused-strings --service deepl-free --config <TOKEN>

Using a en.json like this:

{
	"test": "example"
}

This was working fine using v1.14.3.

But with v1.14.4 the following error is thrown:

An error has occurred:
The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at Object.join (node:path:433:7)
    at DeepL.runTranslation (C:\Users\<USER>\AppData\Local\npm-cache\_npx\c2e5601f47c93b16\node_modules\json-autotranslate\lib\services\deepl.js:230:39)
    at DeepL.translateStrings (C:\Users\<USER>\AppData\Local\npm-cache\_npx\c2e5601f47c93b16\node_modules\json-autotranslate\lib\services\deepl.js:123:43)
    at C:\Users\<USER>\AppData\Local\npm-cache\_npx\c2e5601f47c93b16\node_modules\json-autotranslate\lib\index.js:243:60
    at translate (C:\Users\<USER>\AppData\Local\npm-cache\_npx\c2e5601f47c93b16\node_modules\json-autotranslate\lib\index.js:184:72)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Using npx with the specifix v1.14.3 version (npx [email protected] ...) is a temporary solution.

@monsieur-ricky
Copy link
Contributor

Any news on this issue? What is the root cause?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants