Failed to load next config mjs
Next.js "Failed to load SWC binary for linux/x64"
I’m pretty new to Next Js and bolt.diy.
I’m trying to run a Next.js 14.2.3 project in bolt.diy.
The core issue is SWC failing to load
i asked Deepseek and some forums and both recommend disabling swc, but disabling it via Babel causes new errors.
Problem Sequence:
- Initial Error:
Cause: (Deepseek) WebContainer blocks native binaries.
- Attempted Fixes:
- Set in
- Added with preset
- Removed flag after validation error
- New Error:
Fix: Replaced with CSS font imports.
- Next Error:
Fix: Installed the plugin and simplified Babel config.
- Current State:
- Build fails with
- Babel still complains about missing modules despite clean installs.
Steps Taken:
- Deleted , , and multiple times
- Merged into to avoid conflicts
- Added to
- Ensured no usage remains
Environment:
Here’s my package.json
Question:
First of all, why is this problem happening, is this anything to do with SWC? (Yes, i’ve tried running the project locally and in a server as well, both work fine)
How can I fully disable SWC and satisfy Babel/PostCSS dependencies in a restricted environment? Are there critical config tweaks
Unable to deploy Nextjs 12 with transpiled packages
boris1
I’m trying to set up an existing Nextjs app in Netlify but it won’t build. The same app is deployed in Vercel atm without issues. Builds work fine locally. Why are they failing in Netlify?
My nextjs config and package.json files
boris2
boris3
If I try to deploy from the CLI everything works fine but I get a Page Not Found when I open the domain.
SamO4
Hi @boris ,
Have you given this support guide a read and see if that helps?
boris5
I have checked it and it hasn’t helped. I’m more worried about the app not being buildable than the 404 error.
I downloaded the deployment like the guide says and i got ~1GB of files which match what my local build produced. I also have a index.html page there as well as other pages.
hrishikesh7
Hi @boris,
Please continue the discussion in the ticket in helpdesk.
boris8
How do I do that? How can I access that ticket in the helpdesk?
Can you at least confirm if you do indeed support NextJS apps that are NOT [exported]?(Advanced Features: Static HTML Export | Next.js)
hrishikesh9
Can you at least confirm if you do indeed suppor
Failed to load next.config.mjs
> frontend-new@0.1.0 dev
> next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/soodit/Documents/dev/prog/frontend-new/.env
error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/soodit/Documents/dev/prog/frontend-new/src/env/client.mjs' imported from /home/soodit/Documents/dev/prog/frontend-new/src/env/server.mjs
at new NodeError (node:internal/errors:400:5)
at finalizeResolution (node:internal/modules/esm/resolve:326:11)
at moduleResolve (node:internal/modules/esm/resolve:945:10)
at defaultResolve (node:internal/modules/esm/resolve:1153:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:842:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
![]()
Failed to load next.config.mjs
About two hours ago, I successfully deployed version 37 of my project. After that, I continued working and added a novel function to the app, which created version 38. However, when I attempted to deploy this new version, I suddenly started encountering a build error.
The create log shows the following message:
I’m not sure what changed exactly, as the only modification I made was adding a recent function in my app’s logic—not in the configuration file. Everything was working fine before that.
To troubleshoot, I deleted version 38 and tried to redeploy version 37, which had previously deployed successfully. However, now version 37 is also failing with the exact same error, even though I hadn’t modified anything in that version.
I’d really appreciate any help figuring out what might be going on here or how I can fix it.
https://v0.dev/chat/fork-of-funcional-mas-reciente-24-mar-25-pero-no-h-7Wf26u4eY65
I also noticed something that might be related to the issue.
The error message refers to a file named , but in my project, I’ve always used the standard file (with the extension, not ). I haven’t created or renamed any config file recentl
Error deplying a nextjs website
tomamal1
ssvp-kelambakkam.netlify.app](https://ssvp-kelambakkam.netlify.app
Failed to load next.config.mjs, see more info here `next.config.js` Loading Error | Next.js
my next.config.mjs
/** @type {import(‘next’).NextConfig} */
const nextConfig = {};export default nextConfig;
nathanmartin2
@tomamal Did you read the Next documentation that the error links to?
https://nextjs.org/docs/messages/next-config-error
tomamal3
Hi, thanks for your immediate response. Yes, I did have a look into the ref docs but I don’t find any syntax error, sine the config file is just an empty file. Sorry if I am sounding very naive…I am just a beginner trying to get a feel of things here. I am just struck , unable to proceed further
nathanmartin4
@tomamal Is the file in the correct location?
Does your build command (not your development command) work locally?
tomamal5
local build command worked without any errors
nathanmartin6
I’m stumped then.
I’d expect the same error in both locations (unless it was related to case sensitivity).
Are you able to provide access to the repository?
tomamal7
GitHubGitHub - tomamal/