When working on a custom client, you should base your code on the
hubs-cloud branch branch, which will be the branch that has client changes compatible with Hubs Cloud servers. When server upgrades occur (approximately once a month), you should merge with the latest changes to this branch. Changes due to upgrades will be visible in merged PRs on the branch.
git clone https://github.com/mozilla/hubs cd hubs git checkout hubs-cloud
Now that you have the Hubs repository cloned you'll need to install some dependencies. You'll need Node JS installed first. Then you'll install the hubs dependencies. We recommend using
npm ci instead of
npm install so that you always use the versions of modules in the
To run the client against your Hubs Cloud stack and deploy code to it, you'll need to be authenticated. Run
npm run login and follow the instructions to authenticate.
npm run login
Once you are logged in you can start up the local development server with
After you've made changes to your client's code you can deploy the changes to your Hubs Cloud stack with the
npm run deploy command. Once that has finished you should see the changes live on your site! Please expect the
npm run deploy command to take a while.
npm run deploy
Note: When running a deploy, ensure webpack-dev-server (
npm start) is not running. This may cause conflicts in the build process.
npm run deploy hangs on "Building Admin Console" for more than 20 minutes:
- Stop then restart
npm run deploy(sometimes it takes 2 tries to deploy)
- If it still hangs on "Building Admin Console" you may have a problem building the Admin Console
To test that your admin panel build is working, in your hubs repo root, try:
cd admin- be in the admin/ directory
npm run build
- If these commands succeed, try the
npm run deploycommand again.
- If these commands fail, try
npm ciand the
buildcommands one more time, then fix the error in your code, then try these commands again.
If at any point you want to revert your Hubs client back to using the Mozilla upstream version of the client, run
npm run undeploy.
npm run undeploy