diff --git a/src/portal/.nvmrc b/src/portal/.nvmrc new file mode 100644 index 00000000000..50e4b92aeb8 --- /dev/null +++ b/src/portal/.nvmrc @@ -0,0 +1 @@ +v16.18.0 diff --git a/src/portal/README.md b/src/portal/README.md index 9f0fa6941bb..dd72a299e21 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 1321960f2af..fd01622f118 100644 --- a/src/portal/tsconfig.json +++ b/src/portal/tsconfig.json @@ -18,5 +18,5 @@ ], "useDefineForClassFields": false }, - "exclude": ["cypress.config.ts"], + "exclude": ["cypress.config.ts"] }