Skip to content

yarn pnp should be the first preloaded module in NODE_OPTIONS #6941

@jdalton

Description

@jdalton

The pnp module is currently appended to the existing NODE_OPTIONS value which allows other modules to be attempted to be pre-loaded first and be unresolved.

See source here:

  if (await fs.exists(pnpPath)) {
    nodeOptions += ` --require ${pnpPath}`;
  }

Instead it should be something like:

  if (await fs.exists(pnpPath)) {
    nodeOptions = `--require ${pnpPath} ${nodeOptions}`;
  }

Related to #6629 (comment).

Update:

PR opened at #6942.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions