安装 Nuxt3 应用程序时“Fetch API 是一项实验性功能。此功能可能随时更改”

mar*_*ube 14 javascript node.js nuxt.js nuxtjs3

我尝试使用以下命令创建新的 nuxt 应用程序

npx nuxi init my-app
Run Code Online (Sandbox Code Playgroud)

成功创建了带有 Nuxt 3.0 stable 的新应用程序,但我得到了这个恼人的响应

Nuxi 3.0.0-rc.10                                                                                              15:04:22

 ERROR  (node:35527) 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)
Run Code Online (Sandbox Code Playgroud)

让我困惑的是Nuxi 3.0.0-rc.10的版本和我相信它来自节点的错误。

节点 - 18.12.1

npm - 8.19.2

git-2.38.1

Cro*_*row 22

对我来说升级到node就足够了18.13.0


kis*_*ssu 3

首先,您应该运行Nuxt 3.0.0(稳定版本),而不是 RC。

另外,这是一个警告,因此您可以忽略它。特别是因为它与 Node v18 本身相关,而不是与 Vue/Nuxt 相关。有关如何抑制警告的一些详细信息,请参见此处:https://github.com/netlify/cli/issues/4608#issuecomment-1223696635

至于警告,通常会标记实验功能直到它们完全稳定。这是该消息的官方来源