How to install the React Pos
Overview
This task will setup VSCode for development with the Enactor React Pos. Note: The Enactor React Pos doesn't need to be run within vscode.
Time to Complete: 10 minutes
What You'll Learn
- How to connect to the Enactor NPM repository
- How to install the npm dependencies
- How to start the React Pos
Pre-requisites
Setting up a Development Workspace
Please install https://github.com/nvm-sh/nvm. This allows for multiple node/npm versions to be installed on your machine and allows for switching between them.
Then using nvm in the terminal
nvm install 14.17.3
And then in the terminal to use the version
nvm use 14.17.3
Instructions
Installation
To install the Enactor dependencies, you will need to set your npm registry to point to the Enactor Verdaccio Repository
Open the folder ../WorkspaceSetup/CustomerProducts/TrainingReactPos
in vscode.
Open a terminal.
cd /src-js/packages/training-react-pos
Set the npm package registry location to the Enactor npm registry.
npm set registry https://npm.enactor.co.uk/
npm login
User will be requested for the following. Use the credentials of your Active Directory user.
- username
- password
Then in the terminal run:
npm install
Running
This will start the pos at http://localhost:3000.
Open a terminal:
npm start
See Also
To remove the Enactor registry
If you need to delete the user registration from your machine you will need to edit your .npmrc file. This file is located at:
- Unix:
~/.npmrc
- Windows:
C:\\Users\<username>\.npmrc