下一个JS strapi-错误 - typeError:获取失败

发布于 2025-02-02 04:02:22 字数 117 浏览 2 评论 0原文

模块构建失败:未经处理的SchemeError:从“节点:断言”中读取的插件(未经处理的方案)不会处理。 WebPack支持“数据:”和“文件:” URIS默认情况下。 您可能需要一个其他插件来处理“节点:” uris。

Module build failed: UnhandledSchemeError: Reading from "node:assert" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

菊凝晚露 2025-02-09 04:02:22

我对下一个12.3.1和Strapi版本v4.4.1也有同样的问题。
这是由于Strapi在节点16上运行,接下来是在18上运行。
检查Next和Strapi安装的版本

  • 通过运行node -v在Next -news和Strapi的根文件夹中 )
    如果它们是不同的运行
  • NVM安装V16(对于NextJS root)
  • nvm使用16(在NextJS root上),

这解决了我的问题。
(还要记住要通过一个绝对URL来获取)

I had the same problem with next 12.3.1 and STRAPI VERSION v4.4.1.
It was due to the strapi was running on node 16 and next was running on 18.
Check your version of next and strapi installation by running

  • node -v (in terminal in the root folder of both next and strapi)
    if they are different run
  • nvm install v16(for the nextjs root)
  • nvm use 16 (on the nextjs root)

This solved my issue.
(also remember to pass an absolute URL for the fetch)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文