All versions of Hub require the following setup.
React and Hub V1
For most of Hub v1, using
@email@example.com (check it in your
package.json file), you need to follow the common environment configuration.
Different versions of the Hub framework require different versions of Node. NVM is a tool that will allow multiple versions of Node to be available on the same environment.
Using only Node.js
If you are not planning to support a Hub V2 application or an old Hub V1 application using
firstname.lastname@example.org, you do not need to install NVM. You can install the last version of Node.JS.
Verify your setup by installing a version of Node and checking its version.
On Windowsnvm install latestnvm use 12.14.1 # Use the version installed by the previous command
On Macnvm install node
Checking versionsnode -vnpm -v
Hub aims to support as many recent versions of Node.js as possible. The specific version used is left to the discretion of the app owners.
Optional - Some repositories use
yarnas a package manager. You can install it with your current version of Node.npm install -g yarn
Authentication with Azure DevOps
Your home directory's
.npmrc file should include the following:
The token set here is used locally on your computer. It is different for each user. Do not include this information in your application's repository.
When creating a new Hub React App or Updating hub.coomon.tooling for Hub v1, you will need to create an
.npmrc file in the application root to use iQmetrix's Azure Artifacts package registry (
You can skip this step if you are using the iQmetrix CRA Template to create a React app. This file already exists in the template.
If you are getting an npm
ERR! 404 or
ERR! 401 Unauthorized when running
npm install you may need still to setup
~/.npmrc with your Azure credentials as described in the previous section.
Optional - Install a git GUI
Setup for SSH Keys
Make sure you leave the password blank or you will have issues running NPM through other tools.
Verify your installation is working by cloning a repositorygit clone email@example.com:iQmetrix/iQ.design.system.docs.git
Each version of Hub requires different environment configuration.
You can either run
npm start in an existing app or create a new one to test your environment. No additional configuration should be necessary if you are using node 10+. To test, navigate to
http://localhost:9000/#dev and confirm the app is running.
These steps are for those using firstname.lastname@example.org
You can either run
npm start in an existing app or clone the Hub.Boilerplate to test your environment. No additional configuration should be necessary if you are using Node 8+. To test, navigate to
http://localhost:9000/#dev and confirm the app is running
Install and use Node.js 6.3.1nvm install 6.3.1nvm use 6.3.1
Clone the monorepo and navigate to the project sourcegit clone email@example.com:iQmetrix/hub.gitcd hub
Install the CLInpm install -g hub.tools --registry https://pkgs.dev.azure.com/iqmetrix/_packaging/iqmetrix/npm/registry/
Run the package.json
setupscript. This is only needed the first time you set up a clone of Hub v2.npm run setup
Verify your setup by running hub.app.homecd projects/apps/hub.app.homehub serve
http://localhost:9000and confirm the app is running