Continuing the discussion from Building Cocos Creator project from command line:
Thanks for your help, but I’m still unable to build a Cocos Creator project from the command line.
Here is what I did:
I created a new project using Cocos Creator (Dashboard-> New Project, based on 'Hello World’ one), which will be located in ~/NewProject
if I do Cocos Creator->File->Build and build for Platform ‘Web Mobile’, with Build Path beeing ‘~/NewProject/build’, then a directory ~/NewProject/build/web-mobile is created and contain all generated files => the build is working fine using Cocos Creator
Now, if I try to do it using command line, using ‘cocos run -p web’
- from ~/NewProject, I get ‘~/NewProject/.cocos-project.json is not found.’
- same from ~/NewProject/build
- same from ~/NewProject/build/web-mobile
I create a .cocos-project.json file in ~/NewProject/ containing:
Now, if I run the same command line (‘cocos run -p web’), the error message I get is: 'There isn’t any available platforms.’
(same is happening whatever path I’m using to type those commands: ~/NewProject/ , ~/NewProject/build/ or ~/NewProject/build/web-mobile)
Please note that COCOS_CONSOLE_ROOT is correctly initialized: ~/cocos2d-x-3.10/tools/cocos2d-console/bin
What am I missing?