Skip to content

[bug] new toolchain error in offline mode #2245

@sybernatus

Description

@sybernatus

Describe the bug

I have project using node with yarn in my monorepo. I have upgraded moon to the latest version going through the v1.40 and the new toolchain configuration.

old toolchain

$schema: "https://moonrepo.dev/schemas/toolchain.json"
node:
  packageManager: "yarn"
  yarn: {}

new toolchain

$schema: "https://moonrepo.dev/schemas/toolchain.json"
unstable_javascript:
  packageManager: 'yarn'

unstable_node: {}

unstable_yarn: {}

Problem is that I'm in offline mode and while the old toolchain was working without downloading plugins, the new one need to download the wasm plugins so I'm a little bit blocked.

I've also tried to set the environment variable MOON_TOOLCHAIN_FORCE_GLOBALS=true in my pod but it seems not working neither.

Steps to reproduce

  1. setup a project with proto
node = "25.2.1"
yarn = "4.12.0"
  1. setup the new toolchain
$schema: "https://moonrepo.dev/schemas/toolchain.json"
unstable_javascript:
  packageManager: 'yarn'

unstable_node: {}

unstable_yarn: {}
  1. setup a yarn project with a simple task using yarn
tasks:
  install:
    command:
      - "yarn"
      - "install"
  1. in CI run the MOON_TOOLCHAIN_FORCE_GLOBALS=true moon ci :install

The CI return the following error:

Error: plugin::loader::failed_download

  × Failed to download plugin from https://github.com/moonrepo/plugins/
  │ releases/download/node_depman_toolchain-v0.2.0/node_depman_toolchain.wasm.
  ├─▶ Failed to make HTTP request for https://github.com/moonrepo/plugins/
  │   releases/download/node_depman_toolchain-v0.2.0/
  │   node_depman_toolchain.wasm.
  ├─▶ error sending request for url (https://github.com/moonrepo/plugins/
  │   releases/download/node_depman_toolchain-v0.2.0/
  │   node_depman_toolchain.wasm)
  ├─▶ client error (Connect)
  ╰─▶ Connection reset by peer (os error 104)

Expected behavior

moon should used the yarn provisioned locally in the container instead of downloading them.

Screenshots

Environment

 moon -V - moon 1.41.7
 proto -V - proto 0.53.2

Additional context

  • The CI image is provisioned with moon & proto at build time
  • The proto setup is ran during the build image so the image is also already provisioned with node & yarn.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions