Berry: [Bug] Docker Implementation of Yarn Berry Fails on Fetch Step of `yarn install`

Created on 9 Jun 2020  Â·  2Comments  Â·  Source: yarnpkg/berry

  • [ ] I'd be willing to implement a fix

Describe the bug

I am upgrading Yarn to v2 on a containerized app but when running the yarn install command in an entrypoint script it fails with the following error:

app_1  | (node:92) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise ➤ YN0001: RangeError: Invalid count value
app_1  |     at String.repeat (<anonymous>)
app_1  |     at f.writeProgress (/.yarn/releases/yarn-berry.js:25:257340)
app_1  |     at f.writeLine (/.yarn/releases/yarn-berry.js:25:255483)
app_1  |     at f.writeLineWithForgettableReset (/.yarn/releases/yarn-berry.js:25:255562)
app_1  |     at f.reportInfo (/.yarn/releases/yarn-berry.js:25:253799)
app_1  |     at f.startTimerPromise (/.yarn/releases/yarn-berry.js:25:252776)
app_1  |     at async se.install (/.yarn/releases/yarn-berry.js:31:197567)
app_1  |     at async /.yarn/releases/yarn-berry.js:71:56013
app_1  |     at async Function.start (/.yarn/releases/yarn-berry.js:25:251761)
app_1  | ➤ YN0000: Failed with errors in 2.28s
app_1  | Range Error: Invalid count value
app_1  |     at String.repeat (<anonymous>)
app_1  |     at f.writeProgress (/.yarn/releases/yarn-berry.js:25:257340)
app_1  |     at f.writeLine (/.yarn/releases/yarn-berry.js:25:255483)
app_1  |     at f.writeLineWithForgettableReset (/.yarn/releases/yarn-berry.js:25:255562)
app_1  |     at f.reportError (/.yarn/releases/yarn-berry.js:25:254427)
app_1  |     at finalize (/.yarn/releases/yarn-berry.js:25:255294)
app_1  |     at Function.start (/.yarn/releases/yarn-berry.js:25:251822)

This is the relevant part of the docker-compose file:

app: build: context: . target: dev image: ### command: puma -C config/puma.rb entrypoint: - yarn.sh

Interestingly enough, when I exec into the pod, I am able to run yarn install successfully. It only fails when running docker-compose up

Screenshots

Screen Shot 2020-06-08 at 5 52 55 PM

Environment if relevant (please complete the following information):

  • OS: Linux
  • Node version: 12.16.1
  • Yarn version: 2.0.0-rc.34
bug

Most helpful comment

All 2 comments

I have the same problem as soon as I add tty: true in my docker-compose to have colored logs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

janicduplessis picture janicduplessis  Â·  4Comments

wojtekmaj picture wojtekmaj  Â·  3Comments

Mike-Dax picture Mike-Dax  Â·  3Comments

chrisands picture chrisands  Â·  3Comments

mormahr picture mormahr  Â·  3Comments