我试图运行一个Next v13.1.6项目,我刚刚使用yarn create next-app创建了它,但由于某种原因,当我运行yarn dev时,它会自动停止,就像它是一个构建一样
在这里你可以看到:
我的package.json看起来像这样:
{
"name": "nft-generator",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@next/font": "13.1.6",
"@types/node": "18.11.18",
"@types/react": "18.0.27",
"@types/react-dom": "18.0.10",
"eslint": "8.33.0",
"eslint-config-next": "13.1.6",
"next": "13.1.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
}
}
1条答案
按热度按时间zdwk9cvp1#
您需要使用
next dev
来保持它在更改时自动重新启动。将"dev":"next"
更改为"dev":"next dev"