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
fardeen awaisOP
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
Yi Lon Ma
- 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
fardeen awaisOP
Okay i will do this again. but my next.config.js export this: /** @type {import('next').NextConfig} */
const nextConfig = {}

module. Exportss = nextConfig
Avatar
Yi Lon Ma
it should be module.exports
Avatar
fardeen awaisOP
Yes it is module.exports there is a typo when i paste it in discord
Avatar
Yi Lon Ma
try reinstalling the modules after deleting the node_modules and lockfile
Avatar
fardeen awaisOP
Okay let me do it again
Avatar
fardeen awaisOP
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
Alfonsus Ardani
have you tried creating a new create-next-app
Avatar
fardeen awaisOP
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
fardeen awaisOP
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
Alfonsus Ardani
can you npx next info
Avatar
fardeen awaisOP
Image
Above was the screenshot of new next app. Here is the ss of my current project
Image
Avatar
Yi Lon Ma
You're using 32bit windows. I don't think Swc works with 32bit systems
Avatar
fardeen awaisOP
My operating system is 32 or i'm using something in 32??
Image
Avatar
fardeen awaisOP
@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
Yi Lon Ma
@fardeen awais
Answer
Avatar
Alfonsus Ardani
give this man the credit