1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    4
    Vote Rating
    3
    curtisdf is on a distinguished road

      0  

    Exclamation SDK Tools for Mac overwrites system $PATH and breaks the command line

    SDK Tools for Mac overwrites system $PATH and breaks the command line


    I installed Sencha SDK Tools 1.2.3 on my Intel-based MacBook Pro (Snow Leopard) recently, and shortly after that I noticed problems in my terminal window. Whenever I open a new tab, I now see the following error messages:

    -bash: export: `Tools:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin': not a valid identifier
    -bash: export: `Tools/command:/Applications/Sencha': not a valid identifier
    -bash: export: `Tools/jsbuilder:/Applications/Sencha': not a valid identifier
    -bash: export: `Tools/appbuilder:/Applications/Sencha': not a valid identifier
    It appears the SDK Tools installer added something to my system that causes my $PATH to be overwritten, as shown below:

    # echo $PATH
    /Applications/Sencha
    HUH?!?!?!?! How do I fix this? I tried uninstalling the tools via the uninstall.app it came with, but the problem persists. I'm not sure where else to look. The only way I can use Terminal.app now is to manually re-export a sane $PATH value whenever I open a new tab.

    The SDK tools weren't even installed in /Applications/Sencha. The installer put them in /Applications/SenchaSDKTools-1.2.3.

  2. #2
    Ext JS Premium Member stever's Avatar
    Join Date
    Mar 2007
    Posts
    1,407
    Vote Rating
    6
    stever will become famous soon enough stever will become famous soon enough

      0  

    Default


    Look in ~/.bashrc

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    4
    Vote Rating
    3
    curtisdf is on a distinguished road

      0  

    Default No ~/.bashrc exists

    No ~/.bashrc exists


    Unfortunately, no ~/.bashrc exists. Also, neither /etc/bashrc nor /etc/profile, nor the files in /etc/paths.d/ has anything new that would be causing this problem.

    Is there a plist file somewhere perhaps?

  4. #4
    Ext JS Premium Member stever's Avatar
    Join Date
    Mar 2007
    Posts
    1,407
    Vote Rating
    6
    stever will become famous soon enough stever will become famous soon enough

      0  

    Default


    Oh, the Mac, sorry. Try ~/.profile

  5. #5
    Sencha User
    Join Date
    Apr 2011
    Posts
    4
    Vote Rating
    3
    curtisdf is on a distinguished road

      0  

    Default Ok

    Ok


    Ok yeah, that's the one. Never thought to look there. Funny... here are its contents (blank lines removed):

    export PATH=/Applications/Sencha SDK Tools:$PATH
    export PATH=/Applications/Sencha SDK Tools/command:$PATH
    export PATH=/Applications/Sencha SDK Tools/jsbuilder:$PATH
    export PATH=/Applications/Sencha SDK Tools/appbuilder:$PATH
    export PATH=/Applications/SenchaSDKTools-1.2.3:$PATH
    export PATH=/Applications/SenchaSDKTools-1.2.3/command:$PATH
    export PATH=/Applications/SenchaSDKTools-1.2.3/jsbuilder:$PATH
    export PATH=/Applications/SenchaSDKTools-1.2.3/appbuilder:$PATH
    Now that I see this file, I think during a prior install I changed the default installation directory to "Sencha SDK Tools" instead of "SenchaSDKTools-1.2.3" as was the default. So... looks like the installer needs some way to deal with space characters in the installation path, or to prevent entering paths with spaces in the first place.

    I commented out all those lines, and my $PATH is set properly now. Thanks!

  6. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    4
    Vote Rating
    0
    mattopenstack is on a distinguished road

      0  

    Default


    It breaks because those paths name with a space need to be quoted otherwise it is interpreted incorrectly. This is a newb mistake, Sencha should fix this as a priority.

  7. #7
    Sencha User
    Join Date
    Aug 2011
    Location
    Cincinnati, OH
    Posts
    8
    Vote Rating
    0
    npenny is on a distinguished road

      0  

    Lightbulb Same problem, couldn't fix, found solution

    Same problem, couldn't fix, found solution


    I've built in Sencha/Javascript, but I'd never used the Terminal before. I had the exact problems here and was totally lost, so I'd like to add in layman's terms how I fixed it. I would also like to add that while this worked for me, I am not a Terminal expert and I would still take an extreme level of caution when using it.

    Every time I started the Terminal I got:
    Code:
    Last login: Wed Mar 14 10:23:52 on ttys000
    -bash: export: `Tools/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin': not a valid identifier
    Productions-MAC:~ Productions$
    If I typed
    Code:
    echo $PATH
    it gave me
    Code:
    /Applications/SenchaSDKTools-2.0.0-Beta/jsbuilder:/Applications/SenchaSDKTools-2.0.0-Beta:/Applications/SenchaSDKTools-2.0.0-Beta/bin:/Applications/Sencha
    Uninstalling the SDK Tools didn't fix the issue, neither did reinstalling it.

    Turns out the problem stemmed from when I changed the default installation directory for the SDK Tools the first time I installed them, from /Applications/SenchaSDKTools-2.0.0-Beta/ to /Applications/Sencha SDK Tools/. When I couldn't run anything (including the sencha command test here), I figured some basic startup file for Terminal had been modified, which after Googling found was probably my .bash_profile (hidden file found in /Users/UserName/ folder). I ended up being able to open it in the Terminal and found that the first line included a directory that didn't exist (/Applications/Sencha). I deleted that first line, saved the file, and Terminal was back up and running normally with Sencha Command finally working as well.

    In order to edit it, I had to also include the full paths for basic commands. This didn't work:
    Code:
    sudo nano /.bash_profile
    But this did:
    Code:
    /usr/bin/sudo /usr/bin/nano /.bash_profile
    (After I deleted the messed up line in .bash_profile, I didn't have to use full paths anymore.)

    My guess is that spaces in directory names caused the error, which would explain why it was /Applications/Sencha rather than where I had initially installed it: /Applications/Sencha SDK Tools/. It would also explain why uninstalling the first time didn't fix it.

    NOTE: Possibly unrelated, but I had to use
    Code:
    command/sencha app create MyApp ../MyApp/
    not
    Code:
    sencha app create MyApp ../MyApp/
    in order to generate the basic app. Is this normal?

  8. #8
    Sencha User
    Join Date
    Aug 2011
    Location
    Plymouth, UK
    Posts
    137
    Vote Rating
    -2
    simondavies has a little shameless behaviour in the past

      0  

    Default


    i managed to get the following running:
    Code:
    /usr/bin/sudo /usr/bin/nano /.bash_profile
    but this lists nothing other than then GNU nano 2.0.6 and the menu at the bottom, with a blank screen in between?

    Any ideas how i can solve my issue?

    thanks

  9. #9
    Sencha User
    Join Date
    Apr 2014
    Posts
    1
    Vote Rating
    0
    felipeqga is on a distinguished road

      0  

    Default SDK PATH ERROS

    SDK PATH ERROS


    Hello friends,
    I solved the installation several errors sencha changing the following:
    Two VERY IMPORTANT files:


    /Users/sencha/.bashrc
    /Users/sencha/.bash_profile

    Hello friends,
    I solved the installation several errors sencha changing the following:
    Two VERY IMPORTANT files:


    My install folder:
    / Sancha
    Default installation location:
    / Applications/SenchaSDKTools-2.0.0-Beta /


    Take a look:

    nano /Users/sencha/.bash_profile


    export PATH=/Users/sencha/bin/Sencha/Cmd/4.0.4.84:$PATH


    export SENCHA_CMD_3_0_0="/Users/sencha/bin/Sencha/Cmd/4.0.4.84"


    export PATH=/Sencha/SenchaSDKTools-2.0.0-beta3:$PATH


    export SENCHA_SDK_TOOLS_2_0_0_BETA3="/Sencha/SenchaSDKTools-2.0.0-beta3"
    #
    export PATH=/Applications/SenchaSDKTools-2.0.0-beta3:$PATH


    export SENCHA_SDK_TOOLS_2_0_0_BETA3="/Applications/SenchaSDKTools-2.0.0-beta3"


    SENCHA_SDK_TOOLS_2_0_0_BETA3=/Applications/SenchaSDKTools-2.0.0-beta3/
    #
    export PATH="$PATH:/usr/local/bin"
    export PATH=/Users/admin/bin/Sencha/Cmd/4.0.4.84:$PATH
    export SENCHA_CMD_4_0_0="/Users/admin/bin/Sencha/Cmd/4.0.4.84"
    #
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/command:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/jsbuilder:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/appbuilder:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/command:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/jsbuilder:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/appbuilder:$PATH


    #---------------------------------------------------------------------------------#
    nano /Users/sencha/.bashrc


    export PATH=/Users/sencha/bin/Sencha/Cmd/4.0.4.84:$PATH


    export SENCHA_CMD_3_0_0="/Users/sencha/bin/Sencha/Cmd/4.0.4.84"


    export PATH=/Sencha/SenchaSDKTools-2.0.0-beta3:$PATH
    #
    export SENCHA_SDK_TOOLS_2_0_0_BETA3="/Sencha/SenchaSDKTools-2.0.0-beta3"


    export PATH=/Applications/SenchaSDKTools-2.0.0-beta3:$PATH


    export SENCHA_SDK_TOOLS_2_0_0_BETA3="/Applications/SenchaSDKTools-2.0.0-beta3"


    SENCHA_SDK_TOOLS_2_0_0_BETA3=/Applications/SenchaSDKTools-2.0.0-beta3/
    #
    export PATH="$PATH:/usr/local/bin"
    export PATH=/Users/admin/bin/Sencha/Cmd/4.0.4.84:$PATH
    export SENCHA_CMD_4_0_0="/Users/admin/bin/Sencha/Cmd/4.0.4.84"
    #
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/command:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/jsbuilder:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/appbuilder:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/command:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/jsbuilder:$PATH
    #export PATH=/Applications/SenchaSDKTools-2.0.0-Beta/appbuilder:$PATH






    ####--comando




    cd /Applications/XAMPP/xamppfiles/htdocs/touch ; sencha generate app teste ../teste