Skip to content

Commit be0d141

Browse files
authored
fix(runtime): disable type errors in production and fix zombie process collection (#2027)
1 parent 99ce4f1 commit be0d141

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

runtimes/nodejs/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM node:20.10.0
22

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

55
# RUN npm install npm -g
66

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

2929
USER node
30-
CMD [ "sh", "/app/start.sh" ]
30+
31+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
32+
33+
CMD [ "sh", "/app/start.sh" ]

runtimes/nodejs/src/handler/typings.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ async function getThreePartyPackageTypings(
102102
data: pkd.declarations,
103103
})
104104
} catch (error) {
105-
logger.error(requestId, 'failed to get package typings', error)
105+
if (!Config.isProd) {
106+
logger.error(requestId, 'failed to get package typings', error)
107+
}
108+
106109
return res.send({
107110
code: 1,
108111
error: error.toString(),

0 commit comments

Comments
 (0)