From 87e23b49e700f96378da9bd17741c4b473cf3448 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 18 Apr 2024 15:19:19 +0200 Subject: [PATCH 1/5] hotFix: change require to import --- front/salix/components/change-password/index.js | 2 +- front/salix/components/reset-password/index.js | 2 +- modules/ticket/front/main/index.js | 2 +- modules/worker/front/descriptor/index.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/front/salix/components/change-password/index.js b/front/salix/components/change-password/index.js index 7e30bf54e..93241b781 100644 --- a/front/salix/components/change-password/index.js +++ b/front/salix/components/change-password/index.js @@ -1,5 +1,5 @@ import ngModule from '../../module'; -const UserError = require('vn-loopback/util/user-error'); +import UserError from 'core/lib/user-error'; export default class Controller { constructor($scope, $element, $http, vnApp, $translate, $state, $location) { diff --git a/front/salix/components/reset-password/index.js b/front/salix/components/reset-password/index.js index c0a10cc52..b49eab841 100644 --- a/front/salix/components/reset-password/index.js +++ b/front/salix/components/reset-password/index.js @@ -1,5 +1,5 @@ import ngModule from '../../module'; -const UserError = require('vn-loopback/util/user-error'); +import UserError from 'core/lib/user-error'; export default class Controller { constructor($scope, $element, $http, vnApp, $translate, $state, $location) { diff --git a/modules/ticket/front/main/index.js b/modules/ticket/front/main/index.js index c49418cfc..64bb7e191 100644 --- a/modules/ticket/front/main/index.js +++ b/modules/ticket/front/main/index.js @@ -1,6 +1,6 @@ import ngModule from '../module'; import ModuleMain from 'salix/components/module-main'; -const UserError = require('vn-loopback/util/user-error'); +import UserError from 'core/lib/user-error'; export default class Ticket extends ModuleMain { fetchParams($params) { diff --git a/modules/worker/front/descriptor/index.js b/modules/worker/front/descriptor/index.js index d7962369c..75265acb4 100644 --- a/modules/worker/front/descriptor/index.js +++ b/modules/worker/front/descriptor/index.js @@ -1,6 +1,6 @@ import ngModule from '../module'; import Descriptor from 'salix/components/descriptor'; -const UserError = require('vn-loopback/util/user-error'); +import UserError from 'core/lib/user-error'; class Controller extends Descriptor { constructor($element, $, $rootScope) { super($element, $); From 9ec51e534d2401ec827fce1d132f2c258c9ed78c Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 18 Apr 2024 15:39:25 +0200 Subject: [PATCH 2/5] fix: jenkins puppeteer --- back/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/back/Dockerfile b/back/Dockerfile index 363192a0b..7728b1d90 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -40,6 +40,7 @@ RUN apt-get update \ WORKDIR /salix COPY print/package.json print/pnpm-lock.yaml print/ +RUN pnpx puppeteer browsers install chrome RUN pnpm install --prod --prefix=print COPY package.json pnpm-lock.yaml ./ From f766b9a3b128c281b9512c38a43150683e63ff7b Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 19 Apr 2024 07:17:53 +0200 Subject: [PATCH 3/5] fix: try to fix puppeteer --- back/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/Dockerfile b/back/Dockerfile index 7728b1d90..f537a7062 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -40,12 +40,12 @@ RUN apt-get update \ WORKDIR /salix COPY print/package.json print/pnpm-lock.yaml print/ -RUN pnpx puppeteer browsers install chrome RUN pnpm install --prod --prefix=print COPY package.json pnpm-lock.yaml ./ COPY loopback/package.json loopback/ RUN pnpm install --prod +RUN node node_modules/puppeteer/install.mjs COPY loopback loopback COPY back back From 8b468b52ea64e109bb217879a8fb01fdca8b907c Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 19 Apr 2024 07:21:35 +0200 Subject: [PATCH 4/5] fix: try to fix puppeteer --- Jenkinsfile | 2 ++ back/Dockerfile | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d700ce1f9..8e625de59 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,6 +71,8 @@ pipeline { stage('Back') { steps { sh 'pnpm install --prefer-offline' + sh 'pnpx puppeteer browsers install chrome' + // sh 'node node_modules/puppeteer/install.mjs' } } stage('Print') { diff --git a/back/Dockerfile b/back/Dockerfile index f537a7062..363192a0b 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -45,7 +45,6 @@ RUN pnpm install --prod --prefix=print COPY package.json pnpm-lock.yaml ./ COPY loopback/package.json loopback/ RUN pnpm install --prod -RUN node node_modules/puppeteer/install.mjs COPY loopback loopback COPY back back From 91e13070c729abf5c29185d2f57bb2886983bdbb Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 19 Apr 2024 07:27:54 +0200 Subject: [PATCH 5/5] fix: try to fix puppeteer --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8e625de59..bfe31fc60 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,8 +71,7 @@ pipeline { stage('Back') { steps { sh 'pnpm install --prefer-offline' - sh 'pnpx puppeteer browsers install chrome' - // sh 'node node_modules/puppeteer/install.mjs' + sh 'node node_modules/puppeteer/install.mjs' } } stage('Print') {