简体   繁体   English

Next.js 错误 - 无法加载 SWC 二进制文件,请在此处查看更多信息:https://nextjs.org/docs/messages/failed-loading-swc

[英]Next.js error - Failed to load SWC binary, see more info here: https://nextjs.org/docs/messages/failed-loading-swc

I am trying to start a next.js project and I keep getting this error: "error - Failed to load SWC binary, see more info here: https://nextjs.org/docs/messages/failed-loading-swc" , when I type "npm run dev".我正在尝试启动 next.js 项目,但我不断收到此错误:“错误 - 无法加载 SWC 二进制文件,请在此处查看更多信息: https://nextjs.org/docs/messages/failed-loading-swc” ,当我输入“npm run dev”。 I have managed to find a workaround by creating a file called.babelrc and adding this code inside:我设法通过创建一个名为 .babelrc 的文件并在其中添加以下代码来找到解决方法:

{
"presets": ["next/babel"]
}

But this is not a fix, would like to know why I am getting this error and how can avoid it without missing out on the SWC module?但这不是解决方法,想知道为什么我会收到此错误以及如何避免它而不会错过 SWC 模块? 在此处输入图像描述

There was an issue with my node, some extra packages of node were not downloaded.我的节点有问题,没有下载一些额外的节点包。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Next 加载 SWC 二进制文件失败 - Next failed to load SWC binary 未能加载 SWC 二进制文件 - Failed to load SWC binary 使用绑定安装和 Yarn 3 在 Docker 中使用 SWC minify 开发 Next.js:缺少 swc-linux-x64-gnu linux 二进制文件 - Developing Next.js with SWC minify in Docker with bind mount and Yarn 3: missing swc-linux-x64-gnu linux binary 为什么 getStaticProps 给出“无法为 win32/x64 加载 SWC 二进制文件”的错误? - Why getStaticProps giving error of "Failed to load SWC binary for win32/x64"? Next.js 如何将 SWC 编译器与 Material UI 和 swc-plugin-transform-import 一起使用 - Next.js how to use SWC compiler with Material UI and swc-plugin-transform-import 如何在 Next JS 中启用 SWC 别名导入? - How to enable SWC Aliased imports in Next JS? 无法将 Next.js 部署到 Netlify。 由于@netlify/plugin-nextjs 插件中的错误,部署失败 - Cannot deploy Next.js to Netlify. Deploy failed due to an error in @netlify/plugin-nextjs plugin 预呈现页面“/404”时发生错误。 阅读更多:https://nextjs.org/.../.../prerender-error 类型错误:c.props.href.startsWith 不是 function - Error occurred prerendering page "/404". Read more: https://nextjs.org/.../.../prerender-error TypeError: c.props.href.startsWith is not a function Next.js 未处理的运行时错误“无法加载脚本:/_next/static/chunks/...”仅在开发模式下触发 - Next.js Unhandled Runtime Error "Failed to load script: /_next/static/chunks/..." only triggered in dev mode 在 Next.JS 的 `getStaticPaths` 中设置 `fallback: true` 时,`throw new Error('Failed to load static props')` - `throw new Error('Failed to load static props')` when setting `fallback: true` in `getStaticPaths` in Next.JS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM