Next.js Discord

Discord Forum

Testing out Next with Relay - getting weird ModuleNotFound with generated file

Unanswered
Black carpenter ant posted this in #help-forum
Open in Discord
Black carpenter antOP
This is the repo if anyone could test it out and help me figure out why it isn't working:

https://github.com/allinws/testingrelay

Clone the repo

npm install

Run it with npm run dev

You can run npm run relay which works but when I run npm run dev I get the following error. Can anyone help me understand why it's not working?

I'm getting the following error when going to localhost:3000

⨯ ./app/MainView.tsx:39:17
Module not found: Can't resolve '/Users/myusername/Documents/CODE/nextjs-13-relay-alex/__generated__/MainViewQuery.graphql.ts'
  37 |     queryRef: PreloadedQuery<MainViewQuery>;
  38 |   }) {
> 39 |     const data = usePreloadedQuery(
     |                 ^
  40 |       graphql`
  41 |         query MainViewQuery($owner: String!, $name: String!) {
  42 |           repository(owner: $owner, name: $name) {

0 Replies