Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime): Disable type errors in production and fix zombie proces… #2027

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions runtimes/nodejs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:20.10.0

RUN apt update && apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev git -y
RUN apt update && apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev git dumb-init -y

# RUN npm install npm -g

Expand All @@ -27,4 +27,7 @@ RUN chown node:node /app/package.json
RUN chown node:node /app/package-lock.json

USER node
CMD [ "sh", "/app/start.sh" ]

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

CMD [ "sh", "/app/start.sh" ]
5 changes: 4 additions & 1 deletion runtimes/nodejs/src/handler/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ async function getThreePartyPackageTypings(
data: pkd.declarations,
})
} catch (error) {
logger.error(requestId, 'failed to get package typings', error)
if (!Config.isProd) {
logger.error(requestId, 'failed to get package typings', error)
}

return res.send({
code: 1,
error: error.toString(),
Expand Down
Loading