avitorio / outstatic

Outstatic - A static CMS for Next.js
https://Outstatic.com
MIT License
2.67k stars 157 forks source link

Cannot read properties of null (reading 'query') on Next v13 #29

Closed mzalevski closed 1 year ago

mzalevski commented 1 year ago

on http://localhost:3000/outstatic

I double checked the getting started config & it is correct

Server Error

TypeError: Cannot read properties of null (reading 'query')
This error happened while generating the page. Any console logs will be displayed in the terminal window.
avitorio commented 1 year ago

Hey, we currently don't support Next v13. Working on adding support soon.

We've added this notice to the Adding Outstatic to a Next.js website docs:

Next.js 13 notice: At this moment we are only supporting Next.js 12. We are working hard to launch a version compatible with Next.js 13 soon!

Right now you can use Outstatic on Next.js ^12.2.6

chaosparadox commented 1 year ago

@avitorio Hii, I'm having the same issue as OP and I'm on v12.2.5 - Any suggestions? The idea of Outstatic is amazing so I'm really hoping to make it work!

avitorio commented 1 year ago

Hey @chaosparadox and @mzalevski - I've just launched version 0.0.32-rc of Outstatic which gives support for Next.js 13 and also offers backwards compatibility to some versions of Next.js 12 including 12.2.5,

Please, let me know if this version works for you! I'm closing this PR now. Thank you!

mzalevski commented 1 year ago

@avitorio I get 404 on: http://localhost:3000/api/outstatic/login

  1. go to: http://localhost:3000/outstatic
  2. click: Sign in with GitHub
  3. redirected to: http://localhost:3000/api/outstatic/login
  4. 404
avitorio commented 1 year ago

Hey @mzalevski, This is odd. What are the contents of your pages/api/outstatic/[[...ost]].tsx file? What versions of next and outstatic are you on?

mzalevski commented 1 year ago

Oh, I see what's wrong. I created another api folder in an existing api folder. My bad. It does work now. Sorry.