mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(core): Fix pdf extract not working (#16463)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
This commit is contained in:
@@ -10,15 +10,21 @@ RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store --moun
|
||||
RUN pnpm build
|
||||
|
||||
# Delete all dev dependencies
|
||||
RUN jq 'del(.pnpm.patchedDependencies)' package.json > package.json.tmp; mv package.json.tmp package.json
|
||||
RUN node .github/scripts/trim-fe-packageJson.js
|
||||
# We don't want to remove all patches because we want them still to be applied
|
||||
# in `pnpm deploy`. However, we need to remove FE patches because we trim the FE
|
||||
# package.json files and `pnpm deploy` will fail otherwise. element-plus is the
|
||||
# only FE patch that we need to remove.
|
||||
RUN jq '.pnpm.patchedDependencies |= with_entries(select(.key | startswith("pdfjs-dist") or startswith("pkce-challenge")))' package.json > package.json.tmp; mv package.json.tmp package.json
|
||||
|
||||
# Delete any source code or typings
|
||||
RUN find . -type f -name "*.ts" -o -name "*.vue" -o -name "tsconfig.json" -o -name "*.tsbuildinfo" | xargs rm -rf
|
||||
|
||||
# Deploy the `n8n` package into /compiled
|
||||
RUN mkdir /compiled
|
||||
RUN NODE_ENV=production DOCKER_BUILD=true pnpm --filter=n8n --prod --no-optional --legacy deploy /compiled
|
||||
# We don't want to use --no-optional because pdfjs-dist has an optional dependency on
|
||||
# @napi-rs/canvas, which is required for the pdfjs-dist package to work.
|
||||
RUN NODE_ENV=production DOCKER_BUILD=true pnpm --filter=n8n --prod --legacy deploy /compiled
|
||||
|
||||
# 2. Start with a new clean image with just the code that is needed to run n8n
|
||||
FROM n8nio/base:${NODE_VERSION}
|
||||
|
||||
Reference in New Issue
Block a user