avitorio / outstatic

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

TypeError: Cannot read properties of null (reading 'query') #1

Closed import-brain closed 1 year ago

import-brain commented 1 year ago

Hi, I've been trying to replace my current CMS on my website with Outstatic. I followed the documentation and was able to get to where I got the "sign in with GitHub" screen, but after I authorized the OAuth app, it redirected back to localhost and errored out with "TypeError: Cannot read properties of null (reading 'query')". Could you please help me on this? Thank you so much!

Screenshot 2022-10-21 at 11 30 23 PM
avitorio commented 1 year ago

Hey @import-brain Thanks for flagging this. I'll take a look at it over the weekend.

import-brain commented 1 year ago

Hey @import-brain Thanks for flagging this. I'll take a look at it over the weekend.

Thank you!

avitorio commented 1 year ago

@import-brain Would you be able to create a repo where I could try to reproduce the error?

import-brain commented 1 year ago

@import-brain Would you be able to create a repo were I could try to reproduce the error?

Could you please clarify what you mean? Do you want a repo with Next and Outstatic set up? Thanks

avitorio commented 1 year ago

@import-brain Sorry, for not clarifying. If you could create a minimal clone of your current repository and make it public so I can check it out, that'd be great.

I have created a Discord server for the project, so if you want to reach out to me over there perhaps we could solve this quickly together: https://discord.gg/kBz3u7cA

Cheers!

import-brain commented 1 year ago

@import-brain Sorry, for not clarifying. If you could create a minimal clone of your current repository and make it public so I can check it out, that'd be great.

I have created a Discord server for the project, so if you want to reach out to me over there perhaps we could solve this quickly together: discord.gg/kBz3u7cA

Cheers!

I used create-next-app to try to reproduce the error, but it worked perfectly first try, and I can't reproduce the error now. How odd... it has to do with how the real site is configured. I'll join the Discord.

avitorio commented 1 year ago

Ok, closing this. :)

tinspham209 commented 1 year ago

Same error with my current website, but when I update next version, from 12.2.3 to 12.3.1, this error is fixed!

import-brain commented 1 year ago

Same error with my current website, but when I update next version, from 12.2.3 to 12.3.1, this error is fixed!

@tinspham209 Just tried this, and it worked! Thank you so much!

import-brain commented 1 year ago

Should we add something to the documentation like "requires next version 12.3.1"?

avitorio commented 1 year ago

Hey @import-brain and @tinspham209 - I've just updated outstatic to 0.0.32-rc. This new version should work on Next.js ^13.0.0 as well as ^12.0.0!

Let me know if works for you!

import-brain commented 1 year ago

Hey @import-brain and @tinspham209 - I've just updated outstatic to 0.0.32-rc. This new version should work on Next.js ^13.0.0 as well as ^12.0.0!

Let me know if works for you!

Works fine for me! Thank you!