facebook / relay

Relay is a JavaScript framework for building data-driven React applications.
https://relay.dev
MIT License
18.36k stars 1.82k forks source link

Bun support for relay-compiler #4463

Open hyochan opened 11 months ago

hyochan commented 11 months ago

I changed my projects' package manager to Bun and when I run relay-compiler with bun, it throws below error. It only works with yarn. I have no idea how to tackle this issue 🤔

> dooboo@1.0.0 relay
> relay-compiler

HINT: pass --watch to keep watching for changes.
Error: Cannot find module 'relay-compiler/lib/transforms/FlattenTransform'
Require stack:
- /Users/hyo/dooboo/node_modules/relay-compiler-language-typescript/lib/TypeScriptGenerator.js
- /Users/hyo/dooboo/node_modules/relay-compiler-language-typescript/lib/index.js
- /Users/hyo/dooboo/node_modules/@ardatan/relay-compiler/bin/relay-compiler
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/Users/hyo/dooboo/node_modules/relay-compiler-language-typescript/lib/TypeScriptGenerator.js:52:24)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
npm notice 
npm notice New minor version of npm available! 10.1.0 -> 10.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.0
npm notice Run npm install -g npm@10.2.0 to update!
npm notice 
edvinerikson commented 11 months ago

/Users/hyo/dooboo/node_modules/@ardatan/relay-compiler/bin/relay-compiler

You have an old broken fork of the relay-compiler in your dependency graph, seems that might cause issues.

Try uninstalling @ardatan/relay-compiler and relay-compiler-language-typescript and then update relay to v15