From 4e54649c5cf51dcf0ce8cd3681ba315a235a02ba Mon Sep 17 00:00:00 2001 From: rober12 Date: Wed, 22 May 2024 09:32:05 +0200 Subject: [PATCH] update README.md --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 918567f..3a3b4df 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,42 @@ tsc |exampleAuthentication| It contains an example of how authentication is done |[Wiki](https://github.com/alastria/alastria-identity-example/wiki/Authentication-example) |keystores| Contains the mocked keystores that we used to create the identities with different roles. These roles are explained [here](/keystores/README.md) | +## Environment requirements +**This section specifies the environment requirements for the successful execution of the examples.** + +First of all, to avoid possible errors with node and npm, it is recommended that the installation is done through **Nvm**. + +Once you have **Nvm installed**, all you need to do is install the required version of node with . +```sh +nvm install +``` + +On the other hand, if any problem persists, it is recommended to **clean the npm cache** with the following command +```sh +npm cache clean -f +``` + +The list of Npm and Node versions that have worked for the different members of the core identity team are listed below. +|**Versions**|**Does it work?**| +|:--|:--| +|Node 14.19.0 && Npm 6.14.16|**OK**| +|Node 14.20 && Npm 6.14.17|**OK**| +|Node 14.20.1 && Npm 6.14.17|**OK**| +|Node 16.13.0 && Npm 8.15.0|**OK**| +|Node 16.13.2 && Npm 8.1.2|**OK**| +|Node 16.14 && Npm 8.3.1|**OK**| +|Node 18.19.0 && Npm 10.2.3|**OK**| + +### Problems with the version of the library and the json-objects installed when running npm install +If you encounter problems with the version of the library and the json-objects that are installed after npm install, you need to perform the following steps to solve these problems: +- Delete node_modules folder -> `rm -rf node_modules` +- Delete the package-lock.json -> `rm package-lock.json` +- Clean the cache -> `npm cache clean -f` +- Install all dependencies -> `npm install` (from the root directory) + +Following these steps then check that the version of the library and the json objects that have been installed are correct. To do this go to the `node_modules -> alastria-identity-lib` folder and look at the code inside, to check if it is the one you want. +Perform the same checking operation for the json-object code `node_modules -> alastria-identity-json-objects` ## How to use it