Dockerfile build error /app/nobelium/node_modules/@next/swc-linux-x64-gnu/next-swc.linux-x64-gnu.node: __snprintf_chk: symbol not found
See original GitHub issueDescribe the bug Dockerfile build error
Error: Error relocating /app/nobelium/node_modules/@next/swc-linux-x64-gnu/next-swc.linux-x64-gnu.node: __snprintf_chk: symbol not found at Object.Module._extensions…node (internal/modules/cjs/loader.js:1144:18) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:93:18) at Object.<anonymous> (/app/nobelium/node_modules/next/dist/build/swc/index.js:29:20) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) { code: ‘ERR_DLOPEN_FAILED’ } error - Failed to load SWC binary, see more info here: https://nextjs.org/docs/messages/failed-loading-swc error Command failed with exit code 1
Dockerfile Dockerfile based on https://github.com/craigary/nobelium/blob/main/Dockerfile
FROM node:14-alpine AS deps
WORKDIR /app
RUN apk add --no-cache --update tzdata git openssh libc6-compat && \
ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone && \
apk del tzdata
RUN git clone --depth=1 https://github.com/craigary/nobelium.git
WORKDIR /app/nobelium
RUN yarn install --frozen-lockfile
ENV NOTION_PAGE_ID xxxx
RUN yarn build
ENV NODE_ENV production
EXPOSE 3000
CMD ["yarn", "start"]
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
@craigary @xukecheng https://gist.github.com/kenmori/2b31d0cde603751cf92afe2e2bb20263
this should help
it will report this error:
So, When I just use “yarn install”, it work well.
Thanks.