jimmychu0807/substrate-front-end-template

Yarn install doesn't work with latest version of Node

Closed this issue · 2 comments

I followed the instructions in a Docker container based off of node:17. yarn install failed. I changed the Dockerfile to use from node:14 and it worked.

The Dockerfile looks like this:

from node:17 # make substrate-front-end-template build by changing this to from node:14

RUN apt-get update && apt-get upgrade -y

RUN apt-get install -y git clang curl libssl-dev llvm libudev-dev
RUN apt-get install -y tmux
COPY ./rustup-init /root/rustup-init # get this from https://rustup.rs/
RUN /root/./rustup-init -y
RUN rm /root/rustup-init

RUN /root/.cargo/bin/rustup default stable
RUN /root/.cargo/bin/rustup update

RUN /root/.cargo/bin/rustup update nightly
RUN /root/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly

WORKDIR /root

CMD ["/bin/bash"]

cor commented

I'm having the same issue:

node --version => v17.0.1
yarn --version => 3.0.2.

When running yarn install, the console gets spammed with the following message:

➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/strea

@sdwoodbury @cor

Currently front-end template is only supporting the latest LTS node version, v16. If v16 doesn't work for you, please reopen this ticket and let me know. Thanks.