-
Notifications
You must be signed in to change notification settings - Fork 27k
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
"ENOENT: no such file or directory" - next.js crashes, related to image caching? #33860
Comments
disabled avif but now also getting the same issue with webp images:
|
downgraded to 12.0.9 now and it seems all good, i think this may be the offfending commit: #33719 |
Same here
[edited] Apparently, it worked again in version 12.0.9 |
Same here. I can also confirm it happens on Node.js It does work after reverting to |
This comment has been minimized.
This comment has been minimized.
I'm not able to reproduce, but I believe there's a race condition when the stale image is being served from the cache but it gets deleted before the stream completes. PR #33883 should fix it. If anyone could provide a repo that crashes every time, that would be great to validate so we could add it as an integration test to avoid regressing. |
@styfle hey. Here's the repo that crashes: https://github.com/b-novikov-ipersonality/nextjs-cache-crash
|
Great, thanks! I was able to reproduce once adding a Dockerfile and a few other steps mentioned in this PR. |
This is fixed on canary, thanks! You can try it out today with I also discovered that serving stale images wasn't any faster because revalidation wasn't happening in the background, it was blocking. So I created PR #33930 with the another fix. (Update: closed in favor of #34075) Update: This has been released in Next.js 12.1.0 |
I downgraded to 12.0.9 and also installed the canary version and although the server doesn't crash I get the error a lot and reloading the page has unpredictable behavior with images, sometimes few of them load sometimes others won't. |
Wow thanks. This is one of those rare occasions that I search for an error, only to find it wasn't my mistake and fixed in the last few days 😍 Sending appreciation for next@canary and nextjs team! |
Downgraded to 12.0.9 fixed it for me (no errors or crash), the new canary version would still throw errors every time I scrolled past an image, but wouldn't crash server like 12.0.10. |
@yayza have you tried |
Ran into this issue when trying to install. Has anyone else come across this? npm ERR! Found: [email protected] |
@gngo2018 it looks like you have other dependencies that need to be updated as well e.g. |
@ijjk Yes, I also tried
|
@yayza can you confirm you updated properly with
|
@ijjk I just checked and it says it's the updated version |
This ensures we handle `EEXISTS` with `fs.rmdir` for Node.js `v12` and use `fs.rm` when available instead as it is the replacement for `fs.rmdir` with the `recursive` option. ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` Fixes: #33860 (comment)
Facing the same issue event after updating to nextjs 12.0.9 - docker is crashing every now and then - in my live app. This is my first app. Can anyone please help! |
You should lock NextJS to version 12.0.9:
and npm install again. |
Thanks @havran it seems to be working now - still monitoring. |
@yayza the above PR is now landed in |
No more errors, thanks alot for the quick fix! |
I have this error as well, @ijjk out of curiosity, when is 12.0.11 planned to be released? Knowing would help me in how I would like to work around this for now. |
@joggienl they just released 12.1.0 today |
so the answer to when is never 😅 |
Just found it - it is in 12.1: e3e62aa |
@derkoe you can check the release information here: https://github.com/vercel/next.js/releases/tag/v12.1.0 There is a reference to the pull requests that are mentioned in this issue: |
2022-02-22T10:28:12.259 client-tst Error: ENOENT: no such file or directory, open '/app/.next/cache/images/jyLfZatL4kb....bk5QE=/0.1645521961763.w6...1XPU=.webp' client hetarchief vercel/next.js#33860 (comment)
oh it seems to be fixed no more crashing |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Run
next info
(available from version 12.0.8 and up)What version of Next.js are you using?
12.0.10
What version of Node.js are you using?
17.4.0
What browser are you using?
Chrome
What operating system are you using?
Debian
How are you deploying your application?
next build
Describe the Bug
Upgraded my site to next.js 12.0.10 and with the new release started getting errors;
and then next server dies and restarts
Expected Behavior
shouldn't be crashing.
To Reproduce
any code with avif + image caching support i guess
The text was updated successfully, but these errors were encountered: