Next.js Discord

Discord Forum

Server is not running in next.jsHey there! I got an error in my terminal while starting the server

Answered
fardeen awais posted this in #help-forum
Open in Discord
Avatar
PS D:\My main folder\My projects\three.js T-shirt site in Next.js\t-shirt> yarn dev
yarn run v1.22.19
$ next dev
- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- warn Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
- info Using wasm build of next-swc
error Command failed with exit code 1.

The problem is that when i go to the stack overflow it say delete nodemodule or yarn.lock. Clear your yarn cache and reinsall yarn packages and start. But it doesn't work in any project.
Image
Answered by Yi Lon Ma
@fardeen awais
View full answer

22 Replies

Avatar
- It says that there is a file next.config.js but it doesn't export a config.
- Try installing packages again after removing the node modules and lockfile
Avatar
Okay i will do this again. but my next.config.js export this: /** @type {import('next').NextConfig} */
const nextConfig = {}

module. Exportss = nextConfig
Avatar
it should be module.exports
Avatar
Yes it is module.exports there is a typo when i paste it in discord
Avatar
try reinstalling the modules after deleting the node_modules and lockfile
Avatar
Okay let me do it again
Avatar
See there is no nodemodule and yarn.lock file. Then i use yarn install to install it. But when i do this again i face this error
Image
See now this is update:
Image
Avatar
have you tried creating a new create-next-app
Avatar
No, personally i try to run the server in my other projects. It also not working
It happens to me today everything was fine yesterday.
Avatar
Hey i install a new project and try to run the server but i still face this problem. Both npm and yarn is failed.
Image
Avatar
can you npx next info
Avatar
Image
Above was the screenshot of new next app. Here is the ss of my current project
Image
Avatar
You're using 32bit windows. I don't think Swc works with 32bit systems
Avatar
My operating system is 32 or i'm using something in 32??
Image
Avatar
@Yi Lon Ma @Alfonsus Ardani Hey both of you thanks for giving your precious time and advice. My server is now working. I reinstall my nodejs and now both npm and yarn packages are working. 🙏🙏
Avatar
@fardeen awais
Answer
Avatar
give this man the credit