Replies: 33 comments 49 replies
-
did you solved this? |
Beta Was this translation helpful? Give feedback.
-
same on ubuntu <- proot-distro <- termux <- android 13 aarch64 why is this discussion when it seems like a bug |
Beta Was this translation helpful? Give feedback.
-
It also gives me that error. did you solve? |
Beta Was this translation helpful? Give feedback.
-
This work for me :
|
Beta Was this translation helpful? Give feedback.
-
It fails exactly during the build stage and I see the same error message. |
Beta Was this translation helpful? Give feedback.
-
Hi there, in my case, brand new installation, enough RAM, latest node, all is ok. |
Beta Was this translation helpful? Give feedback.
-
In my case the issue was present during the npm run start, after run npm run build, it works |
Beta Was this translation helpful? Give feedback.
-
I have my web page on azure, the problem was happen when I set the option output: 'export', In the next.config.js to generate a static export of the page. In the distDir you only going to have static asset's for the page and not a next.js application, If you are not going to use a static page web server, you can deactivate it. You won't get that error again while executing npm run start because with npm run build next gonna build a next app instead of a static webpage... |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
i have the same problem in my staging vps server, and i try this :
note i use pm2. also i checked pm2 logs [id] and tailing /etc/nginx/error |
Beta Was this translation helpful? Give feedback.
-
I am facing same issue. Is it RAM related problem as some people suggested? Will it not work with 1GB RAM? |
Beta Was this translation helpful? Give feedback.
-
As a workaround: We are building production build our project at local system (4GB RAM) and then deploying ".next" to server and node_modules we have separately installed at server. So far it's working, don't know how long. We are not running build command at server. |
Beta Was this translation helpful? Give feedback.
-
I also did lots of research and found this but npm run start and then npm run build might not go quick solution.... |
Beta Was this translation helpful? Give feedback.
-
https://github.com/vercel/next.js/discussions/58523 as per the above link, the issue might be solved by increasing RAM. |
Beta Was this translation helpful? Give feedback.
-
I found a workaround by changing the steps in the workflow .yaml file. Kill all processes first using Example:
|
Beta Was this translation helpful? Give feedback.
-
Based on generateBuildId documentation, I have added the following in my generateBuildId: async () => {
// This could be anything, using the latest git hash
return (process.env.VERSION || Date.now() + Math.round(Math.random() * 2441139)).toString();
}, |
Beta Was this translation helpful? Give feedback.
-
@LLytho If you monitor the build log, you will find that the pages are not being generated. The BUILD_ID is generated during the build phase. In my case page generation including BUILD_ID is not getting generated. If you are also facing this and you have found the solution then please help. |
Beta Was this translation helpful? Give feedback.
-
For me, it was because of setting the output option "export". The BUILD_ID isn't generated in that option. (Idk why)
"scripts": {
...
// The value of the "process.env.NODE_ENV" during next build is "production".
// So change the NODE_ENV value by using "cross-env"
// It didn't affect anything because "build" scipt isn't modified.
"start": "cross-env NODE_ENV=local next start",
"local": "cross-env NODE_ENV=local next build"
},
const isProduction = process.env.NODE_ENV === 'production';
const nextConfig = {
...
output : isProduction ? "export" : "standalone",
} |
Beta Was this translation helpful? Give feedback.
-
I think I understand what happened, at least to me: I tried to run the start script without first generating any build, so the Basically:Do not run the start script without first running the dev or build script.The .next folder is generated when we run the build script or even the dev script. Therefore, you run Maybe it will help someone out there. |
Beta Was this translation helpful? Give feedback.
-
This happens when I forget to use |
Beta Was this translation helpful? Give feedback.
-
npm run build then npm run start This worked for me |
Beta Was this translation helpful? Give feedback.
-
Note: Feel free to close this issue if the problem is resolved, or provide additional details for further assistance. |
Beta Was this translation helpful? Give feedback.
-
Idk if anybody else is having the exact issue I was having but it seems like we're all getting the same errors. I'm somewhat new to nextjs. I've worked a lot w plain react in the past and recently I've been working a lot w react native. I got into the habit of using anonymous functions for my component names. Apparently ESLint doesn't like that. I named the components I was exporting a voila, no more errors. After assigning names to those exported functions and successfully running edit: this worked for a day but then i ran into the same issue the next day (did not install any packages in that time so idk). did these steps again and that fixed the issue for now but im anticipating running into it again. sry guys |
Beta Was this translation helpful? Give feedback.
-
I looked at the repair method mentioned above and tried to build it first. It can work normally after starting. This is useful to me. I used node:21.7.1 next:14 |
Beta Was this translation helpful? Give feedback.
-
That helped me to fix this. https://nextjs.org/docs/pages/api-reference/next-config-js/output |
Beta Was this translation helpful? Give feedback.
-
to solve this issue you should initialize the folders with npm run build then serve the app with npm run start, this worked for me ✨ |
Beta Was this translation helpful? Give feedback.
-
After starting the dev server with |
Beta Was this translation helpful? Give feedback.
-
In my case, I was using a |
Beta Was this translation helpful? Give feedback.
-
In my case. the build wasnt working the the error was show in the first lines and at the end says Compile completed, but it was not. I fix the problem and everything works |
Beta Was this translation helpful? Give feedback.
-
For me, running |
Beta Was this translation helpful? Give feedback.
-
Link to the code that reproduces this issue
https://github.com/LLytho/ENOENT-next
To Reproduce
Results into:
Using
npm run dev
also just cancels. No log file given or any error.Tried with Node 18.18 LTS and Node 20 with npm 9, 10 and yarn.
The issue mainly happens on Next 13.5.x and canary. I tried downgrading to 13.4.x but then after
npm run dev
i only getinfo Using wasm build of next-swc
and it also cancels directly.Current vs. Expected behavior
I'm excepting that next runs
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions