Next.js build randomly fails at random places on stackblitz app reload
Describe the bug
When reloading page (I mean the whole stackblitz app, not the preview), sometime build fails at random places in code and the error is located in the main file (here page/index.js) (the one opened by default when I refresh the whole stackblitz app). It's really a bug, if I hit F5 a bunch of time without changing anything it eventually end up working...
What I think could be the issue. (Maybe I'm totally wrong) : because the main file is opened by default, and there might be some hot changes done automatically at page load while the file is read by webpack during build process. (e.g: it loads content from server, but have local version as well, and want to load local version by replacing server version or something like that...) and those changes might be not fast enough because my computer is almost out of RAM when I do it (but for other reasons)
Link to the blitz that caused the error
https://stackblitz.com/edit/nextjs-vdl647?file=pages%2Findex.js
Steps to reproduce
inconsistant... It just happen sometimes :/
Expected behavior
build should never fail
Screenshots
No response
Platform
Browser name = Chrome
Full version = 93.0.4577.82
Major version = 93
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
performance.memory = {
"totalJSHeapSize": 169400600,
"usedJSHeapSize": 142718532,
"jsHeapSizeLimit": 4294705152
}
Hash = fa2fa735bbb029186c23972eb56445ed5c5fdef5
Additional context
- using default Next.js projet, with just few changes on the Home page
- tested in chrome 93.0.4577.82 and chrome webapp for desktop (windows 10 pro)
- project is linked to a github repo
- my computer was at 95-98% of RAM usage so it might add some delay somewhere (thought it might be interesting to tell you)
- when I refresh the stackblitz app it always show me the warning message I have unsaved changes (even though I saved)
@PaulSenon Thanks for the report, this does sound tricky to reproduce. Have you continued to observe it (semi-)consistently?