“Next.js 应用程序需要 Node.js 版本 >= v18.17.0,但在 Node.js 16.20.2 中遇到错误 - 如何解决?”

问题描述 投票:0回答:1

当我使用 cli 创建下一个 js 应用程序时,然后我输入

npm run dev 

我收到此错误。

You are using Node.js 16.20.2. For Next.js, Node.js version >= v18.17.0 is required.

但是我的节点版本是v20.10.0。我如何解决这个问题。

解决这个问题。

You are using Node.js 16.20.2. For Next.js, Node.js version >= v18.17.0 is required.
reactjs node.js next.js installation frameworks
1个回答
0
投票

如果您运行的是 Debian,则其存储库中的 Node.JS 软件包已过时。您需要卸载它并从 Nodesource repos 安装它。还要确保您的 $PATH 变量中有正确的节点版本。

© www.soinside.com 2019 - 2024. All rights reserved.