Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run dev but server didn't start #6

Open
tsunhua opened this issue Mar 25, 2023 · 3 comments
Open

npm run dev but server didn't start #6

tsunhua opened this issue Mar 25, 2023 · 3 comments

Comments

@tsunhua
Copy link

tsunhua commented Mar 25, 2023

Describe the bug
I attempted to run the project using "npm run dev", but the server did not start. Although the terminal printed some logs, no error messages were displayed. Here are the logs:

 npm run dev

> [email protected] dev
> npm run prepare:data && cross-env NODE_ENV='development' next dev


> [email protected] prepare:data
> node gen/generate-chatgpt-by-category.js

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /Users/xxx/project/chat-flow/.env
warn  - You have enabled experimental feature (appDir) in next.config.js.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

info  - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback
(node:62230) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

(base) 

To Reproduce
According the guide

Expected behavior
The server started

Screenshots
none

Desktop (please complete the following information):

  • OS: macOS
@phodal
Copy link
Member

phodal commented Mar 26, 2023

it looks good
had you try visit http://0.0.0.0:3000

@tsunhua
Copy link
Author

tsunhua commented Mar 26, 2023

When I visit http://0.0.0.0:3000/, it displays HTTP ERROR 502. I tried executing the following command to check if there were any processes listening on port 3000, but nothing was returned.

$ lsof -i:3000

@phodal
Copy link
Member

phodal commented Mar 27, 2023

here is my log, it seems same to yours

> [email protected] dev
> npm run prepare:data && cross-env NODE_ENV='development' next dev


> [email protected] prepare:data
> node gen/generate-chatgpt-by-category.js

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /Volumes/source/ai/chat-flow/.env
warn  - You have enabled experimental feature (appDir) in next.config.js.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

info  - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback
(node:8079) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
event - compiled client and server successfully in 11.2s (262 modules)
wait  - compiling...
event - compiled client and server successfully in 1065 ms (262 modules)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants