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

NPM install hangs for dashboard on W10 and W11 with latest node:alpine #533

Open
bate opened this issue Nov 14, 2024 · 13 comments
Open

NPM install hangs for dashboard on W10 and W11 with latest node:alpine #533

bate opened this issue Nov 14, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@bate
Copy link
Contributor

bate commented Nov 14, 2024

HI, as in 520 mentioned the issue is not resolved and disappears only with alpine18.
We have a couple of devs running still into this issues.

@alexanderM91 alexanderM91 added the bug Something isn't working label Nov 14, 2024
@bate
Copy link
Contributor Author

bate commented Nov 15, 2024

Just some research context for you:

microsoft/WSL#7254 -> Performance -> Solution disable ipv6 Stack, but problematic with no privileged user

Minimal Code that works:

docker build - <<EOF
FROM node:18-alpine AS dashboard
WORKDIR /dashboard
ENV HOME=/dashboard
RUN npm install log.io pm2 -g
EOF

Code that takes too long:

docker build - <<EOF
FROM node:22-alpine3.20 AS dashboard
WORKDIR /dashboard
ENV HOME=/dashboard
RUN npm install log.io pm2 -g
EOF

@bate
Copy link
Contributor Author

bate commented Nov 15, 2024

docker history node:18-alpine
IMAGE          CREATED        CREATED BY                                      SIZE      COMMENT
78d89886bbaa   4 months ago   CMD ["node"]                                    0B        buildkit.dockerfile.v0
<missing>      4 months ago   ENTRYPOINT ["docker-entrypoint.sh"]             0B        buildkit.dockerfile.v0
<missing>      4 months ago   COPY docker-entrypoint.sh /usr/local/bin/ # …   388B      buildkit.dockerfile.v0
<missing>      4 months ago   RUN /bin/sh -c apk add --no-cache --virtual …   5.57MB    buildkit.dockerfile.v0
<missing>      4 months ago   ENV YARN_VERSION=1.22.19                        0B        buildkit.dockerfile.v0
<missing>      4 months ago   RUN /bin/sh -c addgroup -g 1000 node     && …   111MB     buildkit.dockerfile.v0
<missing>      4 months ago   ENV NODE_VERSION=18.20.4                        0B        buildkit.dockerfile.v0
<missing>      4 months ago   CMD ["/bin/sh"]                                 0B        buildkit.dockerfile.v0
<missing>      4 months ago   ADD alpine-minirootfs-3.20.3-aarch64.tar.gz …   8.83MB    buildkit.dockerfile.v0

docker history node:22-alpine3.20
IMAGE          CREATED        CREATED BY                                      SIZE      COMMENT
497218cf1f18   2 weeks ago    CMD ["node"]                                    0B        buildkit.dockerfile.v0
<missing>      2 weeks ago    ENTRYPOINT ["docker-entrypoint.sh"]             0B        buildkit.dockerfile.v0
<missing>      2 weeks ago    COPY docker-entrypoint.sh /usr/local/bin/ # …   388B      buildkit.dockerfile.v0
<missing>      2 weeks ago    RUN /bin/sh -c apk add --no-cache --virtual …   5.59MB    buildkit.dockerfile.v0
<missing>      2 weeks ago    ENV YARN_VERSION=1.22.22                        0B        buildkit.dockerfile.v0
<missing>      2 weeks ago    RUN /bin/sh -c addgroup -g 1000 node     && …   138MB     buildkit.dockerfile.v0
<missing>      2 weeks ago    ENV NODE_VERSION=22.11.0                        0B        buildkit.dockerfile.v0
<missing>      2 months ago   CMD ["/bin/sh"]                                 0B        buildkit.dockerfile.v0
<missing>      2 months ago   ADD alpine-minirootfs-3.20.3-aarch64.tar.gz …   8.83MB    buildkit.dockerfile.v0

@hidranarias
Copy link

I tested it on Windows 10 with WSL2 and Ubuntu 22.
My wslconfig with 6GB of RAM and 2 microprocessors.
I removed all of the old containers and images:
I created a b2c-demo and b2b-demo project
I executed docker/sdk pull under the project
docker/sdk up

No issues found, other than the blackfire warning, which I disabled in the deploy.dev.yml file.

The docker/sdk up goes through all of the steps and it works

@bate
Copy link
Contributor Author

bate commented Nov 22, 2024

Do you have a ipv6 network interface?

@hidranarias
Copy link

running ifconfig on windows and ip -6 addr on Ubuntu, it is active

@SimoSavonenVincit
Copy link

Can confirm that the issue is still present. Cloned the project and latest docker to a new folder, and I needed to edit the dashboard to use 18-alpine as before.

@fsmeier
Copy link
Contributor

fsmeier commented Nov 25, 2024

hmm... we could downgrade the dashboard one to node v18 but it would also just be temporary since v18 has end of support 30 Apr 2025 :/

@bate , can you maybe validate newer node versions prior to v22? I dont see the wsl-issue you linked resolved anytime soon :(

@bate
Copy link
Contributor Author

bate commented Nov 25, 2024

v18 works, everthing above has this issue. I dont have a windows machine but all my colleagues has this issue and we downgrade internally to v18 to get it working.

@bate
Copy link
Contributor Author

bate commented Nov 25, 2024

@hidranarias can you disable the whole v6 stack to track it down?

@hidranarias
Copy link

With IPV6 disabled, it took 17 minutes for the npm install of log and pm2. The rest of the commands went through but the Dashboard and other endpoints didn't work

@alexanderM91
Copy link
Collaborator

Hi,

Could you kindly review the PR submitted by @fsmeier ?

If everything functions as expected, we can proceed with downgrading the version and wait until the WSL issue is resolved.

Thank you in advance!

@bate
Copy link
Contributor Author

bate commented Nov 26, 2024

We test and i will give you feedback here. Thanks @fsmeier

@fsmeier
Copy link
Contributor

fsmeier commented Dec 2, 2024

@bate
I am tempting to add the following as pre-requirement for WSL2 users:
microsoft/WSL#4901 (comment)

Since it is done within the subsystem there shouldnt be obstacles with admin permissions, correct?

WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

5 participants