
Installation of the ERP-UI server
This document explains how to install a staging server for the UI Angular application. For production purposes, see Configuring NGINX server for UI release.
The ERP Frontend runs both on Linux or Windows. This is how you install it on Linux (Ubuntu >20.04).
WARNING: The installation requires specific versions of the components. Please install exactly as stated here.
To run the ERP Frontend server on Ubuntu, you need to install: Node, NPM and Angular CLI.
Detailed info can be also found here: https://github.com/nodesource/distributions/blob/master/README.md
GIT
In order for NPM to be able to find dependencies, you need to install GIT:
sudo apt install git-all
NodeJs
sudo apt install curl
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm n 16.15.1
node -v
This should report the version of Node 16.15.1.
NPM
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
npm -v
Angular
sudo apt install -y build-essential
sudo npm i @angular-devkit/build-angular@12.2.6 --force
sudo npm i @angular/cli@12
sudo npm install -g @angular/cli@12
ERP UI application
Delete the
node_modules
folder (if any) and thepackage-lock.json
file in the project’s directory.
Run the following command to install all the project’s dependencies (* note: erpmain is the user’s name that we had on our machine, ErpFrontend is the folder in which the Angular application is located):
erpmain@erpmain:~/ErpFrontend$ npm install
If there are any compilation errors, do the following and then repeat the previous step:
erpmain@erpmain:~/ErpFrontend$ sudo npm cache clean -f
erpmain@erpmain:~/ErpFrontend$ sudo npm install -g n
erpmain@erpmain:~/ErpFrontend$ sudo n stable
erpmain@erpmain:~/ErpFrontend$ sudo npm install --unsafe-perm=true --allow-root
To run the application, run one of the commands located in the package.json file.
npm start
If you need to fix the error: error:0308010C:digital envelope routines::unsupported, run the following command:
npm audit fix --force
See more details here: https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

