New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getStaticProps crashes on next 12.2.0 when building #38153
Comments
I first experienced a problem with 12.2.0 when our CI pipeline attempted to
Since that time, a new project, created with Reproducing this bug does not require step 2 above in 'To Reproduce" Current workaround: specify |
Thanks, @ShonFrazier! Since this only affects starting a built app with RUN npm install next@12.1.6 Our FROM node:14.9.3-slim
COPY package*.json .
RUN npm install
RUN npm install next@12.1.6
COPY . .
ENTRYPOINT ["npm", "start"] |
It looks like this is not occurring with Next.js in git on the
It looks like someone has fixed this. |
I'm not an expert in this code, but I wonder if perhaps:
Someone with more knowledge of the code might be able to verify if these theories are true. In any case, it does seem to work with the latest version on |
Today, We build nextjs with same Dockerfile, but docker image size is large and changed, and this error is occured. |
Hey, I've made a fresh |
@AlvaroAquijeDiaz If you use |
@mztnnrt it's updated but the error persists 🙁 |
This appears to have been fixed in the newly released 12.2.1. |
Haven't tested 12.2.1 yet but on 12.2.0 canary it would still break up |
I upgrade nextjs version from 12.1.5 to 12.3.0 and experiences the same with @ShonFrazier , this happen only on page that using getStaticProps + getStaticPaths.
|
@DuyBui1993 I don’t have the issue on 12.3.0 🤔 |
Anyone using latest version and having the issue as well? |
This appears fixed in {
"sortedMiddleware": [],
"middleware": {},
"functions": {},
"version": 2
} |
Actually I still experienced a few crashes with 12.3.0 & 12.3.1, just less than before. They were only on the client side, they happened during hydration. Fortunately, this appears to have been fixed by this PR: #41243. When I upgrade to the latest Canary release the error no longer occurs 😃 |
Hey there, going to close this out as stale since there isn't a reproduction provided, but if you are still seeing this on the latest version of Next.js, please open a new issue 🙏 |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000
Binaries:
Node: 18.2.0
npm: 8.5.5
Yarn: 1.22.19
pnpm: 7.3.0
Relevant packages:
next: 12.2.0
eslint-config-next: 12.1.6
react: 18.1.0
react-dom: 18.1.0
What browser are you using? (if relevant)
not relevant
How are you deploying your application? (if relevant)
No response
Describe the Bug
Only when the
export const getStaticProps = () => { ... }
function is added, thepnpm build
crashes displaying the following error.Code
fetcher
is a custom wrapper for the nativefetch
API that nextjs pollyfills.Expected Behavior
Build shouldn't crash and
getStaticProps
should be working as expectedLink to reproduction
unable to reproduce
To Reproduce
getStaticProps
in any pageyarn build
The text was updated successfully, but these errors were encountered: