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
![Avatar](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
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.
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](https://cdn.discordapp.com/attachments/1117402479324299264/1117402479517245520/image.png)
22 Replies
![Avatar](https://cdn.discordapp.com/guilds/752553802359505017/users/510480545160101898/avatars/d79065c9729b5a6a29940dc491a6f34e.webp?size=256)
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](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
fardeen awaisOP
Okay i will do this again. but my next.config.js export this: /** @type {import('next').NextConfig} */
const nextConfig = {}
module. Exportss = nextConfig
const nextConfig = {}
module. Exportss = nextConfig
![Avatar](https://cdn.discordapp.com/guilds/752553802359505017/users/510480545160101898/avatars/d79065c9729b5a6a29940dc491a6f34e.webp?size=256)
Yi Lon Ma
it should be
module.exports
![Avatar](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
fardeen awaisOP
Yes it is module.exports there is a typo when i paste it in discord
![Avatar](https://cdn.discordapp.com/guilds/752553802359505017/users/510480545160101898/avatars/d79065c9729b5a6a29940dc491a6f34e.webp?size=256)
Yi Lon Ma
try reinstalling the modules after deleting the
node_modules
and lockfile![Avatar](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
fardeen awaisOP
Okay let me do it again
![Avatar](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
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](https://cdn.discordapp.com/attachments/1117402479324299264/1117410480416358440/image.png)
See now this is update:
![Image](https://cdn.discordapp.com/attachments/1117402479324299264/1117410619205894174/image.png)
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
have you tried creating a new create-next-app
![Avatar](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
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](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
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](https://cdn.discordapp.com/attachments/1117402479324299264/1117412692546830447/image.png)
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
can you
npx next info
![Avatar](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
fardeen awaisOP
![Image](https://cdn.discordapp.com/attachments/1117402479324299264/1117414291121901588/image.png)
Above was the screenshot of new next app. Here is the ss of my current project
![Image](https://cdn.discordapp.com/attachments/1117402479324299264/1117414814160007198/image.png)
![Avatar](https://cdn.discordapp.com/guilds/752553802359505017/users/510480545160101898/avatars/d79065c9729b5a6a29940dc491a6f34e.webp?size=256)
Yi Lon Ma
You're using 32bit windows. I don't think Swc works with 32bit systems
![Avatar](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
fardeen awaisOP
My operating system is 32 or i'm using something in 32??
![Image](https://cdn.discordapp.com/attachments/1117402479324299264/1117415536373022802/image.png)
![Avatar](https://cdn.discordapp.com/avatars/1029781305954684990/9fc047d62e3f359f362bb5b94616757a.webp?size=256)
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](https://cdn.discordapp.com/guilds/752553802359505017/users/510480545160101898/avatars/d79065c9729b5a6a29940dc491a6f34e.webp?size=256)
Yi Lon Ma
@fardeen awais
Answer
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
give this man the credit