From 98b86363f576107f0f04c8e118c796a1aec83ac2 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sat, 10 Aug 2024 03:19:26 +0200 Subject: [PATCH] Add npm install fallback and remove unused variable Added a fallback npm install command in the Jenkinsfile to handle legacy peer dependencies. Also removed an unused variable from genericForm.tsx to improve code clarity and performance. --- Jenkinsfile | 6 ++++++ src/components/form/genericForm.tsx | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 793e453..137d2ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,6 +39,12 @@ pipeline { echo "Retry ${retryCount}/${MAX_RETRIES} failed" } } + try { + sh 'npm install --legacy-peer-deps --force' + success = true + } catch (Exception e4) { + echo "npm install --legacy-peer-deps --force failed" + } } if (!success) { diff --git a/src/components/form/genericForm.tsx b/src/components/form/genericForm.tsx index df5466f..5f7b294 100644 --- a/src/components/form/genericForm.tsx +++ b/src/components/form/genericForm.tsx @@ -11,7 +11,6 @@ const GenericForm = (formData: FormData) => { const backend: string = formData.backend; const userInput: UserInput = formData.userInput; const spec: Yup.Schema = formData.spec; - const backendFormname = formData.backendFormName const navigate = useNavigate();