From 430390e93008e9b0cfb2ebdbbe7fdbfcb1487d03 Mon Sep 17 00:00:00 2001 From: Namekuji Date: Fri, 7 Jul 2023 02:46:50 -0400 Subject: [PATCH] fix: copy megalodon before node_modules, fix #10424 --- Dockerfile | 3 ++- scripts/clean-all.js | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 823f78caa0..744dba2115 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,13 +51,14 @@ RUN apk add --no-cache --no-progress tini ffmpeg vips-dev zip unzip nodejs-curre COPY . ./ +COPY --from=build /calckey/packages/megalodon /calckey/packages/megalodon + # Copy node modules COPY --from=build /calckey/node_modules /calckey/node_modules COPY --from=build /calckey/packages/backend/node_modules /calckey/packages/backend/node_modules COPY --from=build /calckey/packages/sw/node_modules /calckey/packages/sw/node_modules COPY --from=build /calckey/packages/client/node_modules /calckey/packages/client/node_modules COPY --from=build /calckey/packages/calckey-js/node_modules /calckey/packages/calckey-js/node_modules -COPY --from=build /calckey/packages/megalodon/node_modules /calckey/packages/megalodon/node_modules # Copy the finished compiled files COPY --from=build /calckey/built /calckey/built diff --git a/scripts/clean-all.js b/scripts/clean-all.js index c5fc658499..47aaec25c0 100644 --- a/scripts/clean-all.js +++ b/scripts/clean-all.js @@ -46,6 +46,14 @@ const { join } = require("node:path"); recursive: true, force: true, }); + fs.rmSync(join(__dirname, "/../packages/megalodon/built"), { + recursive: true, + force: true, + }); + fs.rmSync(join(__dirname, "/../packages/megalodon/node_modules"), { + recursive: true, + force: true, + }); fs.rmSync(join(__dirname, "/../built"), { recursive: true, force: true }); fs.rmSync(join(__dirname, "/../node_modules"), {