facebook / facebook/relay

Support Yarn PnP

Open
#2,698 8 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I am playing with Yarn PnP and it seems, that relay-compiler needs to update its dependencies. Am I correct?

```
Error: Package "relay-compiler@3.0.0" (via "/Users/steida/Library/Caches/Yarn/v4/npm-relay-compiler-3.0.0-689015f2aa638296c82c5761e5b4cdb09aed7139/node_modules/relay
-compiler/bin/relay-compiler") is trying to require the package "core-js" (via "core-js/es6") without it being listed in its dependencies (graphql, @babel/generator, @b
abel/parser, @babel/polyfill, @babel/runtime, @babel/traverse, @babel/types, babel-preset-fbjs, chalk, fast-glob, fb-watchman, fbjs, immutable, nullthrows, relay-runtim
e, signedsource, yargs, relay-compiler)
| at makeError (/Users/steida/dev/este/.pnp.js:55:17)
| at Object.resolveToUnqualified (/Users/steida/dev/este/.pnp.js:16133:17)
| at Object.resolveRequest (/Users/steida/dev/este/.pnp.js:16204:31)
| at Function.Module._resolveFilename (/Users/steida/dev/este/.pnp.js:16386:30)
| at Function.Module._load (/Users/steida/dev/este/.pnp.js:16302:31)
| at Module.require (module.js:596:17)
| at require (packages/relay/internal/module.js:11:18)
| at Object. (/Users/steida/Library/Caches/Yarn/v4/npm-relay-compiler-3.0.0-689015f2aa638296c82c5761e5b4cdb09aed7139/node_modules/relay-compiler/bin/rel
ay-compiler:14659:18)
| at __webpack_require__ (/Users/steida/Library/Caches/Yarn/v4/npm-relay-compiler-3.0.0-689015f2aa638296c82c5761e5b4cdb09aed7139/node_modules/relay-compiler/bin/re
lay-compiler:30:30)
| at Object. (/Users/steida/Library/Caches/Yarn/v4/npm-relay-compiler-3.0.0-689015f2aa638296c82c5761e5b4cdb09aed7139/node_modules/relay-compiler/bin/rel
ay-compiler:9651:1)
```

Contributor guide

Open the contributing guide

Research direction

The report points to relay-compiler/bin/relay-compiler and packages/relay/internal/module.js; reproduce the failure with Yarn Plug'n'Play and inspect the compiler package dependency declarations. Done means the compiler runs under Yarn PnP without the undeclared core-js resolution error, with a regression test if the repository has a relevant test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.