下一个JS strapi-错误 - typeError:获取失败
模块构建失败:未经处理的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对下一个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)