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
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.
22 Replies
- 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
@Yi Lon Ma - It says that there is a file `next.config.js` but it doesn't export a config.
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
Yes it is module.exports there is a typo when i paste it in discord
@fardeen awais Yes it is module.exports there is a typo when i paste it in discord
try reinstalling the modules after deleting the
node_modules
and lockfileOkay let me do it again
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
See now this is update:
have you tried creating a new create-next-app
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.
Hey i install a new project and try to run the server but i still face this problem. Both npm and yarn is failed.
Above was the screenshot of new next app. Here is the ss of my current project
You're using 32bit windows. I don't think Swc works with 32bit systems
My operating system is 32 or i'm using something in 32??
@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. ðŸ™ðŸ™
Original message was deleted
@fardeen awais
Answer
give this man the credit