2

When I write sencha in CMD I get this errror:

'sencha' is not recognized as an internal or external command, operable program or batch file.

It is setup automatically like this as an enviromental variable:

enter image description here

but still it is not working.

Any ideas why?

harunB10
  • 4,823
  • 15
  • 63
  • 107

2 Answers2

8

It seems you need to setup sencha cmd to your PATH variable, try something like this: Add SENCHA CMD variable to PATH variable

Another option, is append to PATH variable in CMD session, like this:

C:\Users\myUser>set SENCHA_CMD_6=C:\mySenchaPath\cmd\6.5.2.15

C:\Users\myUser>
C:\Users\myUser>set PATH=%SENCHA_CMD6%;%PATH%

C:\Users\myUser>
C:\Users\myUser>sencha
Sencha Cmd v6.5.2.15

PS: I think you can set the variable to C:\mySenchaPath\cmd (without specifying the version), usually it contains a sencha.exe file that points to the current version.

Edumelzer
  • 1,066
  • 1
  • 11
  • 22
  • Tried with CMD session and it is not working.Btw it works when I navigate to sencha.exe file. – harunB10 Mar 06 '18 at 13:57
  • 1
    @harunB10 Can you show me result of `echo %SENCHA_CMD_3_0_0%` in you cmd? Additionally, try running `%SENCHA_CMD_3_0_0%\sencha.exe` and tell me what happens – Edumelzer Mar 06 '18 at 14:02
  • 1
    It is `C:\Users\hb\bin\Sencha\Cmd\6.5.3.6`. When I run `%SENCHA_CMD_3_0_0%\sencha.exe`, it works. – harunB10 Mar 06 '18 at 14:04
  • 1
    Try run `set PATH=%SENCHA_CMD_3_0_0%;%PATH%` and then `sencha`, tell me the result – Edumelzer Mar 06 '18 at 14:17
  • Nice, you're welcome! :) But remember this solution will only works during your session, when opening a new cmd instance you'll need to type these commands again. I recommend the first solution if you don't want to type this everytime. Good luck! – Edumelzer Mar 06 '18 at 14:22
1

I had to do both, create an environment variable for SENCHA_CMD_3_0_0 with the path to sencha.exe on the C:\Users\user\bin path AND add an entry to the Path variable for %SENCHA_CMD_3_0_0%.

mfclock
  • 31
  • 1
  • 3