From 61646a6201e37364a8831b154d2433e5c65d3d76 Mon Sep 17 00:00:00 2001 From: bupd Date: Fri, 8 Nov 2024 20:08:21 +0530 Subject: [PATCH] add .nvmrc and update doc Signed-off-by: bupd --- src/portal/.nvmrc | 1 + src/portal/README.md | 19 +++++++++++++------ src/portal/tsconfig.json | 1 - 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 src/portal/.nvmrc diff --git a/src/portal/.nvmrc b/src/portal/.nvmrc new file mode 100644 index 000000000000..d78bf0a56cb7 --- /dev/null +++ b/src/portal/.nvmrc @@ -0,0 +1 @@ +v18.20.4 diff --git a/src/portal/README.md b/src/portal/README.md index 9f0fa6941bb1..dd72a299e212 100644 --- a/src/portal/README.md +++ b/src/portal/README.md @@ -8,11 +8,18 @@ This is the project based on Clarity and Angular to build Harbor UI. Start ============ -1. npm install (should trigger 'npm postinstall') -2. npm run postinstall (if not triggered, manually run this step) -3. copy "proxy.config.mjs.temp" file to "proxy.config.mjs" +1. Use the specified Node version: +Run the following command to use the Node version specified in the .nvmrc file: +```bash +nvm install # Install the Node version specified in .nvmrc (if not already installed) +nvm use # Switch to the specified Node version +``` +This step helps avoid compatibility issues, especially with dependencies. +2. npm install (should trigger 'npm postinstall') +3. npm run postinstall (if not triggered, manually run this step) +4. copy "proxy.config.mjs.temp" file to "proxy.config.mjs" `cp proxy.config.mjs.temp proxy.config.mjs` -4. Modify "proxy.config.mjs" to specify a Harbor server. And you can specify the agent if you work behind a corporate proxy -5. npm run start -6. open your browser on https://localhost:4200 +5. Modify "proxy.config.mjs" to specify a Harbor server. And you can specify the agent if you work behind a corporate proxy +6. npm run start +7. open your browser on https://localhost:4200 diff --git a/src/portal/tsconfig.json b/src/portal/tsconfig.json index 3213b1662a2c..fd01622f118f 100644 --- a/src/portal/tsconfig.json +++ b/src/portal/tsconfig.json @@ -12,7 +12,6 @@ "importHelpers": true, "target": "ES2022", "module": "es2020", - "skipLibCheck": true, "lib": [ "es2018", "dom"