Closed anthlasserre closed 2 months ago
Hi @anthlasserre, i'm not sure what this fixes, because the examples folder is not being pushed to npm.
Hi @anthlasserre, i'm not sure what this fixes, because the examples folder is not being pushed to npm.
No indeed. But by taking reference to the example folder on Next 13 / Next 14 it does break on build because of this duplication and by the fact that the signUpHandler
should be exported under app/api
instead of pages/api
.
I stupidly followed the example folder to build my app and I realised this was wrong.
Ohh ok now i get it, yes i duplicated the api route to show the example using pages or app directory, but i forgot that it can break the app
About the question i think it is not necessary because the library should work with a version lower than 13
This is what I thought, no worries mate. Got you đđź Thanks for your quick responses! Hopefully, no one else has made the same mistake as me. đ
Thanks for contributing!
Hey @fedeya đđź
Thanks a lot for this useful plugin. So far so good except for the build today.
Summary
I was facing a few issues related to
@argon2
and@mapbox/node-pre-gyp
. It was running on the browser side. But I had no idea why.Investigation
I have mainly followed the example folder and by giving a second check I might have found a duplication which can cause some troubles.
Starting NextJS 13 all things related to the server should be within
/app
folder instead. https://nextjs.org/docs/messages/prerender-errorAnswer
So I have basically removed
examples/full-example/src/pages/api/sanity/signUp.ts
becauseexamples/full-example/src/app/api/sanity/signUp.ts
is already there to cover thesignUpHandler
export.Also, I'd recommend adding
"next": ">= 13.0.0"
inpeerDependencies
to be sure everyone is targeting NextJS 13 at least. What do you think ?Issues maybe related
It can potentially solve a few issues: