open-next: ENOENT: no such file or directory, scandir '.open-next/...'

I have a nextJS application that was working well until yesterday.

Now during my test deployment phase (npx sst deploy --stage test), I have the ENOENT error, where '.open-next/assets' is missing. This is only happening when I tried to build from gitlab, and if I try to run the command from my mac, it is perfectly working.

Note that I had a build 2h before perfectly working, and I relaunched it, it is now failing…with a similar error: ENOENT: no such file or directory, open '.next/routes-manifest.json'

What could be the reason ? Is there any cache I could remove to retry ?

Thank you.

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Comments: 16

Most upvoted comments

Pretty sure the issue is not on the OpenNext side either, there is no cache or anything that would stop the open-next build command.

There might be some kind of caching from either gitlab or sst that may stop the command (maybe because it’s the same commit)

I’ll close this issue as it doesn’t seem related to OpenNext, you could open an issue in the SST repo. Feel free to reopen the issue if it is indeed an error from OpenNext