Open YufengJin opened 4 years ago
This is not an issue. Yarn create a directory in your home folder and the subdirectory bin.
Check:
x@y:~$ ls ~/.yarn/bin
deepl
~/.yarn/bin/deepl --version
1.1.2
Add .yarn/bin temporary to path:
PATH="$PATH:~/.yarn/bin"
Now exec without path:
deepl --version
1.1.2
To make the path persistent add the line at the end to your ~/.profile:
PATH="$PATH:~/.yarn/bin"
Good evening,
I have the same issue I executed the different command given by Mikkx but I have the same error deepl-translate(1) does not exist, try --help
Thanks for your help and your return
Best Regards
Good afternoon,
I have the same issue as RedGoldPhoenix. deepl-translate(1) does not exist, try --help deepl-detect(1) does not exist, try --help
Thanks in advance!
Still same Issue. :(
Same issue here. Added it to the $path, sourced my .bashrc where I've added it to the path, and it says:
deepl translate -t 'DE' 'How do you do?' deepl-translate(1) does not exist, try --help
+1
workaround
chmod +x ~/.config/yarn/global/node_modules/deepl-translator-cli/deepl-detect.js
chmod +x ~/.config/yarn/global/node_modules/deepl-translator-cli/deepl-translate.js
ln -s ~/.config/yarn/global/node_modules/deepl-translator-cli/deepl-detect.js /usr/local/bin/deepl-detect
ln -s ~/.config/yarn/global/node_modules/deepl-translator-cli/deepl-translate.js /usr/local/bin/deepl-translate
but still, there is an error on DeepL end
$ deepl translate -t "EN" <test.cn.txt
Unexpected error when parsing deepl split sentence response: {"jsonrpc":"2.0","error":{"code":1042911,"message":"Too many requests"}}
workaround
chmod +x ~/.config/yarn/global/node_modules/deepl-translator-cli/deepl-detect.js chmod +x ~/.config/yarn/global/node_modules/deepl-translator-cli/deepl-translate.js ln -s ~/.config/yarn/global/node_modules/deepl-translator-cli/deepl-detect.js /usr/local/bin/deepl-detect ln -s ~/.config/yarn/global/node_modules/deepl-translator-cli/deepl-translate.js /usr/local/bin/deepl-translate
but still, there is an error on DeepL end
$ deepl translate -t "EN" <test.cn.txt Unexpected error when parsing deepl split sentence response: {"jsonrpc":"2.0","error":{"code":1042911,"message":"Too many requests"}}
Exactly the same here. Thank you, themactep for your workarround. I did systemlink to deepl.js too, but exactely the same error-messages... (Kubuntu 22.04)
I have the same error with yarn. I tried with pnpm and it worked fine:
$ yarn global add deepl-translator-cli
yarn global v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "deepl-translator-cli@1.1.2" with binaries:
- deepl
Done in 2.44s.
$ deepl translate -t 'DE' 'How do you do?'
Command 'deepl' not found, did you mean:
command 'drepl' from snap drepl (0.2.1)
command 'deep' from deb python3-deepdiff (5.6.0-2)
See 'snap info <snapname>' for additional versions.
$ deepl -h
Command 'deepl' not found, did you mean:
command 'drepl' from snap drepl (0.2.1)
command 'deep' from deb python3-deepdiff (5.6.0-2)
See 'snap info <snapname>' for additional versions.
$ yarn global remove deepl-translator-cli
yarn global v1.22.19
[1/2] Removing module deepl-translator-cli...
[2/2] Regenerating lockfile and installing missing dependencies...
success Uninstalled packages.
Done in 0.07s.
$ pnpm add -g deepl-translator-cli
Packages: +10
++++++++++
Progress: resolved 10, reused 0, downloaded 10, added 10, done
/home/user/.local/share/pnpm/global/5:
+ deepl-translator-cli 1.1.2
Done in 2.7s
$ deepl
Usage: deepl [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
translate <text> translates the text to a target language
detect <text> detects the text language
help [cmd] display help for [cmd]
as per the last post, I used pnpm
to install again but I still get the following error:
deepl translate -t "DE" "how do you do?" Unexpected error when parsing deepl split sentence response: {"jsonrpc":"2.0","error":{"code":1042912,"message":"Too many requests"}}
It doesn't matter if I pipe the command with echo
:
echo "How are you?" | deepl translate -t DE Unexpected error when parsing deepl split sentence response: {"jsonrpc":"2.0","error":{"code":1042912,"message":"Too many requests"}}
I have successfully installed deepl translate cli(v1.1.2) and nodejs(v14.9.0) . But the command not found in shell. anyone knows where does the binary file of deepl translate locate?