Open jmarroyave-compsci opened 1 year ago
I don't understand why this gets no response from Next team. Ive had an issue open with similar things happening on API routes since the release of 13.5 on Sept. 20.
In our project we had a old hack related to an issues with [...slug]
App.getInitialProps = async ({ router: _ }) => {
//hack to get router.asPath to work with [...slug], with out this it don't return the url but only the acutal url inside next.js
return {
props: {}, // will be passed to the page component as props
}
}
Removing this fixed it in our case, so maybe you should have look if you have any getInitialProps etc that could cause it.
In our project we had a old hack related to an issues with [...slug]
App.getInitialProps = async ({ router: _ }) => { //hack to get router.asPath to work with [...slug], with out this it don't return the url but only the acutal url inside next.js return { props: {}, // will be passed to the page component as props } }
Removing this fixed it in our case, so maybe you should have look if you have any getInitialProps etc that could cause it.
Pages work fine, this is specifically with API routes for me ^
I confirm it is solved in version 14.0.1
Link to the code that reproduces this issue
https://github.com/jmarroyave-compsci/error-nextjs-netlify-styled-jsx
To Reproduce
Current vs. Expected behavior
Expect to fetch data from API's handler but instead shows the errror
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Middleware / Edge (API routes, runtime)
Additional context
What I tried?