Help: Failed to setup cocos html5 v3.0 alpha

Help: Failed to setup cocos html5 v3.0 alpha
0.0 0


Hi guys,
I downloaded the the cocos html5 v3.0 alpha .zip file from the official site, when i setup it, the console outputed as:

Setting up cocos2d-x…
-> Adding COCOS2D_CONSOLE_ROOT environment variable… ALREADY ADDED
-> Looking for NDK_ROOT envrironment variable… FOUND
-> Looking for ANDROID_SDK_ROOT envrironment variable… FOUND
-> Looking for ANT_ROOT envrironment variable… FOUND
COCOS_CONSOLE_ROOT was already added. Edit “/Users/long/.bash_profile” for manual changes
Please execute command: “source /Users/long/.bash_profile” to make added system variables take effect

After i executed the command: “source /Users/long/.bash_profile”, i think the cocos command is ok, but i get the following error:

 longtekiMacBook-Pro:Cocos2d-JS-v3.0-alpha long$ cocos

-bash: cocos: command not found

Did i miss something important?


Anybody here?:slight_smile:


Hi, can you look into the /Users/long/.bash_profile file and show us what’s in there?
Let’s make sure the environment variable have been set.


Hi pandamicro,
I checked the .bash_profile, and found it is empty. So what should i do next?


It’s odd that your source command haven’t take effect, maybe try to use sudo source /Users/long/.bash_profile

Here is my .bash_profile:

export ANT_ROOT=/usr/local/bin
export ANDROID_SDK_ROOT=/Users/panda/tools/adt-bundle/sdk
export ANDROID_NDK_ROOT=/Users/panda/tools/android-ndk-r9b

export COCOS_CONSOLE_ROOT=/Users/panda/cocos2d-js/tools/cocos2d-console/bin


Hi pandamicro,
Thanks for your help, i edit the .bash_profile mannually and it works now!
But i don’t know where is the problem on my setup!