-
Notifications
You must be signed in to change notification settings - Fork 140
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, scandir '.open-next/...' #401
Comments
First thing I'd check is the OS and runtime of the gitlab action. That might explain this weird behavior. |
I don't have access to the machine directly, everything is controlled through a yml file containing the instructions. In my case I have the following instructions:
|
Try removing |
Does GitLab CI/CD action configuration let you configure the OS and node runtime? I'm assuming it does. Can you share the rest of the yml file? Try adding a command to delete the |
I'm working with Bathilde. We run the deploy job with a custom docker image : FROM registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
RUN apt-get update
RUN apt install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt update
RUN apt install -y nodejs
RUN apt install gcc g++ make -y
RUN apt install -y python
RUN apt install -y postgresql
RUN apt install -y libpq-dev And here is the Gitlab-CI job :
|
Can you try adding |
We tried it. It changes nothing. And I added too a |
Yesterday I tried to deploy from my computer and it worked. This morning I've deleted .next .open-next folders before deploying. |
This might not be necessary to run |
I added |
And we have the same error on our gitlab job, which is not running on windows. |
What's your |
Our
|
Are you on a monorepo ? NX maybe ? |
Pretty sure the issue is not on the OpenNext side either, there is no cache or anything that would stop the 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. |
We have a similar error when we add to the Next.js resource buildCommand: 'pnpm run build', We noticed that by default it uses npm, while in our monorepo we use pnpm, so we wanted to use pnpm there as well. It works locally, but not in GH Actions. After deleting the cache from GH, we still get the same error. |
https://github.com/sst/open-next/blob/main/packages/open-next/src/build.ts#L157-L200 |
We use pnpm in our GH Actions by enabling it with corepack: run: corepack enable pnpm Everything uses pnpm, so apparently there is no issue there. After
Which is what makes us believe that it is still using npm. Is that true? |
I have a nextJS application that was working well until yesterday.
Now during my test deployment phase (
npx sst deploy --stage test
), I have theENOENT 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.
The text was updated successfully, but these errors were encountered: