【发布时间】:2019-11-19 12:37:33
【问题描述】:
基于NextJs framework documentation,我按照一些设置步骤运行了一个空项目:
mkdir hello-next
cd hello-next
npm init -y
npm install --save react react-dom next
mkdir pages
然后我将这 3 行添加到我的 package.json 文件中:
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
}
所以现在一切都应该准备好让我的应用程序运行,执行这个命令行:
npm run dev
但我总是在http://localhost:3000 上陷入无休止的加载循环。
在我的控制台输出上:
[ wait ] starting the development server ...
[ info ] waiting on http://localhost:3000 ...
[ ready ] compiled successfully (ready on http://localhost:3000)
【问题讨论】:
标签: javascript reactjs next.js