use-relay-mock-environment icon indicating copy to clipboard operation
use-relay-mock-environment copied to clipboard

Compilation error

Open maxaggedon opened this issue 1 year ago • 1 comments

Just trying this out as it seems to be great to test fragments in storybook, but it keeps crashing with this error :

ModuleParseError: Module parse failed: Unexpected token (56:5)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| } = RelayConcreteNode;
| 
> type ValueResolver = (
|   typeName: string | null | undefined,
|   context: MockResolverContext,
...

Storybook install is pretty recent, component written in TS

maxaggedon avatar Oct 06 '23 13:10 maxaggedon

Hi @maxaggedon, I'm not actively maintaining (nor using) the package anymore. It was implemented when Relay v11 and Storybook v6.3 were out, and both of these have changed drastically in their newest versions.

My recommendation would be to fork the project, and try to upgrade packages like the relay-test-utils package (used in this file) to match your version of Relay.

richardguerre avatar Oct 10 '23 07:10 richardguerre