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

Parcel build hangs while building docker image for linux/amd64 #9834

Open
tankakatan opened this issue Jul 8, 2024 · 1 comment
Open

Parcel build hangs while building docker image for linux/amd64 #9834

tankakatan opened this issue Jul 8, 2024 · 1 comment

Comments

@tankakatan
Copy link

🐛 bug report

Hi everyone,

I have a problem building a Node.js v22 docker image for linux/amd64 platform from my parcel-bundled app on M2 MBP.

The same image gets built without errors if I don't specify the target platform.

I build docker images from my other Node.js v22 apps, for the specified platform without errors if Parcel is not used. Therefore the problem doesn't seem to be related to my docker or OS configuration.

I prepared a minimal setup to reproduce the issue, please see below.

🎛 Configuration (.babelrc, package.json, cli command)

parcel build ./index.tsx

🤔 Expected Behavior

The app gets bundled without errors.

😯 Current Behavior

The build command hangs forever, producing no output at all. Adding --trace and/or --log-level=verbose flags makes no effect.

💁 Possible Solution

I had to downgrade my Node version to v21 in order to make it work.

I tried to change some of my local docker configurations, like setting up QEMU and using buildx, and enabling experimental features in my docker engine, but unfortunately it doesn't help.

🔦 Context

The issue forces me to fallback to older version of Node.js.

💻 Code Sample

Here's a docker file that I use to reproduce the issue:

FROM node:22.0

WORKDIR /app

RUN echo "console.log('Hello world');" > index.tsx
RUN npm i parcel
RUN node ./node_modules/parcel/lib/cli.js build ./index.tsx

The problem occurs when I try to build the image using the following command:

docker build --platform linux/amd64 -t foo:bar -f Dockerfile .

🌍 Your Environment

Software Version(s)
Parcel 2.12
Node v22.0 and above
npm/Yarn 10.8.1
Operating System macOS 14.5, build 23F79
CPU Apple M2 Max
Docker 27.0.3, build 7d4bcd8
@chrischen
Copy link

chrischen commented Aug 17, 2024

I get the same hanging building an unrelated Node 22 app, whereas the arm build succeeds. Previous versions of Node succeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants