relayjs / relay-examples

A collection of sample Relay applications
MIT License
1.14k stars 433 forks source link

Nextjs13 issue tracker example panics due to missing pages directory #274

Open Choongkyu opened 1 year ago

Choongkyu commented 1 year ago

The project currently is missing a pages directory, which leads to this error:

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'pages_dir is expected.', crates/core/src/relay.rs:180:48
info  - Creating an optimized production build .thread '<unnamed>' panicked at 'pages_dir is expected.', crates/core/src/relay.rs:180:48
thread 'thread '<unnamed><unnamed>' panicked at '' panicked at 'pages_dir is expected.pages_dir is expected.', ', crates/core/src/relay.rs:crates/core/src/relay.rs180::18048:
48
thread '<unnamed>' panicked at 'pages_dir is expected.', crates/core/src/relay.rs:180:48
thread '<unnamed>' panicked at 'pages_dir is expected.', crates/core/src/relay.rs:180:48
thread '<unnamed>' panicked at 'pages_dir is expected.', crates/core/src/relay.rs:180:48
thread '<unnamed>' panicked at 'pages_dir is expected.', crates/core/src/relay.rs:180:48
thread '<unnamed>' panicked at 'pages_dir is expected.', crates/core/src/relay.rsthread ':<unnamed>180' panicked at ':pages_dir is expected.48', 
crates/core/src/relay.rs:180:48
info  - Creating an optimized production build ..thread '<unnamed>' panicked at 'pages_dir is expected.', crates/core/src/relay.rs:180:48
info  - Creating an optimized production build  
Failed to compile.

./node_modules/next/dist/pages/_app.js
Error: failed to process

./node_modules/next/dist/pages/_document.js
Error: failed to process

./node_modules/next/dist/pages/_error.js
Error: failed to process

./app/issues/[id]/page.tsx
Error: failed to process

Import trace for requested module:
./app/issues/[id]/page.tsx

./app/layout.tsx
Error: failed to process

Import trace for requested module:
./app/layout.tsx

> Build failed because of webpack errors
error Command failed with exit code 1.

Mentioned in thread, but bumping version of Nextjs13 removes the need to create an empty pages directory as advised.