Configuring Environments
#
CommonAll versions of Hub require the following setup.
React and Hub V1
For most of Hub v1, using @iqmetrix/hub.common.tooling@2.x.x
(check it in your package.json
file), you need to follow the common environment configuration.
#
Node.js and NVMDifferent 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 hub.common.tooling@1.x.x
, you do not need to install NVM. You can install the last version of Node.JS.
Install NVM
Verify your setup by installing a version of Node and checking its version.
On Windows
On Mac
Checking versions
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
yarn
as a package manager. You can install it with your current version of Node.
#
Azure DevOps authenticationThis authentications is necessary to be able to use @iqmetrix
packages from Azure Artifacts. Authenticate with the iQmetrix NPM registry by following the instructions provided by Microsoft.
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.
.npmrc
file#
The 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 (@iqmetrix/packageName
).
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.
404/401 Errors
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.
#
GitHubOptional - 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 repository
#
Specific Hub VersionsEach version of Hub requires different environment configuration.
#
ReactYou 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.
#
Hub v1These steps are for those using hub.common.tooling@2.x
If you are still using hub.common.tooling@1.x
, upgrade it following the upgrading guide. To run non-upgraded Hub v1 applications, configure the old environment .
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
If you have a problem or errors, check the Troubleshooting section from v1 HubBoilerplate.
#
Hub v2Install and use Node.js 6.3.1
Clone the monorepo and navigate to the project source
Install the CLI
Run the package.json
setup
script. This is only needed the first time you set up a clone of Hub v2.Verify your setup by running hub.app.home
Navigate to
http://localhost:9000
and confirm the app is running