Skip to content

Commit

Permalink
fix(runtime): disable type errors in production and fix zombie proces…
Browse files Browse the repository at this point in the history
…s collection (#2027)
  • Loading branch information
HUAHUAI23 committed Aug 14, 2024
1 parent 99ce4f1 commit be0d141
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
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

0 comments on commit be0d141

Please sign in to comment.