英文:
Next dev server automatically closes
问题
我创建了一个基本的Next.js应用程序(包括nextjs-blog入门和一个通用的Next.js应用程序),当我运行“npm run dev”时,它似乎在关闭命令之前停顿了一秒钟。访问localhost:3000只会显示一个屏幕,上面写着“无法访问该网站”。
我已经尝试禁用防火墙,但没有错误消息。
我已经按照在线指南的步骤操作,但出现了问题。
我成功启动了一个标准的Vue3服务器。
英文:
I created a basic next.js application (both the nextjs-blog starter and just a generic nextjs application) and when I run "npm run dev," it appears to hang for a second before just closing the command. Going to localhost:3000 will only bring me to a screen that says "The site cannot be reached."
I have tried disabling firewall and there are no error messages.
I have followed the guides online and it gives me issues.
I have managed to start a standard vue3 server.
答案1
得分: 0
在使用 nextjs 13.x 时遇到了相同的问题,我通过重新安装(而不是更新)Node版本解决了问题。我注意到我的Node架构在某种程度上是32位而不是64位。因此值得检查一下:
- Node架构
- Node版本
英文:
Had the same problem when using nextjs 13.x I resolved by re-installing (instead of updating) the node version. And I notice that somehow my node architecture was 32 instead of 64. So worth to check your:
- Node architecture
- Node version
答案2
得分: 0
我的问题通过运行 yarn install
得到了解决,或者在NPM中运行相应命令可能也会奏效。不知何故,依赖树发生了变化。
英文:
My issue was resolved by running yarn install
, or the equivalent in NPM would probably work. Somehow the dependency tree has changed.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论