Skip to content

fix: set YARN_NODE_LINKER=node-modules for yarn dlx commands#1128

Merged
barslev merged 2 commits intov1.xfrom
barslev/reachabiility-fix-for-yarn-pnp-projects
Mar 23, 2026
Merged

fix: set YARN_NODE_LINKER=node-modules for yarn dlx commands#1128
barslev merged 2 commits intov1.xfrom
barslev/reachabiility-fix-for-yarn-pnp-projects

Conversation

@barslev
Copy link
Contributor

@barslev barslev commented Mar 23, 2026

Yarn PnP mode fails when packages have undeclared dependencies (e.g. @coana-tech/cli accessing @babel/types). Setting the YARN_NODE_LINKER env var to node-modules forces traditional node_modules resolution, avoiding PnP strict dependency errors.


Note

Low Risk
Low risk: only adjusts environment variables for the Yarn Berry dlx execution path, with no broader behavior changes outside Yarn-based runs.

Overview
For Yarn Berry dlx executions, this sets YARN_NODE_LINKER=node-modules in the spawned environment to avoid Plug’n’Play resolution failures from packages with undeclared dependencies.

Written by Cursor Bugbot for commit d13e193. Configure here.

Yarn PnP mode fails when packages have undeclared dependencies
(e.g. @coana-tech/cli accessing @babel/types). Setting the
YARN_NODE_LINKER env var to node-modules forces traditional
node_modules resolution, avoiding PnP strict dependency errors.
@barslev barslev requested a review from mtorp March 23, 2026 09:20
Copy link
Member

@BarrensZeppelin BarrensZeppelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@barslev barslev merged commit 8b492f4 into v1.x Mar 23, 2026
15 of 18 checks passed
@barslev barslev deleted the barslev/reachabiility-fix-for-yarn-pnp-projects branch March 23, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants