vsetka / deepl-translator-cli

This command line tool delivers text translation capabilities to your console and is powered by DeepL (https://www.deepl.com/translator)
MIT License
148 stars 11 forks source link

command not found though successed installed #7

Open YufengJin opened 3 years ago

YufengJin commented 3 years ago

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?

x@x:~$ yarn global add deepl-translator-cli
yarn global v1.22.5
[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 0.25s.
x@x:~$ deepl translate -t 'DE' 'How do you do?'
deepl: command not found
x@x:~$ nodejs --version
v14.9.0
x@x:~$ 
Mikkx commented 3 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"

RedGoldPhoenix commented 3 years ago

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

rodolfoksveiga commented 2 years ago

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!

Hyrikan commented 2 years ago

Still same Issue. :(

emilBeBri commented 2 years ago

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

Benjamin-Connelly commented 2 years ago

+1

themactep commented 1 year ago

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"}}
purpleCrow1710 commented 1 year ago

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)

fabienpiette commented 11 months ago

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]
Cybernetic1 commented 2 months ago

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"}}