React -Parcel-构建失败。错误:无法解析模块“自行发布/包裹 - swc.darwin-x64.node”。
这是一个尴尬的问题。 我前一段时间用使用包裹构建的React进行了该项目。 现在,几个月后,我试图启动该项目,这给了我一些错误。 我再次从存储库下载该项目,并且包裹开始再次建立了几个小时,并且再次出现同样的错误。我再次从存储库下载了该项目,然后开始再次运行,但是没有项目中的任何更改……它开始再次给出相同的构建错误。 你们中有些人遇到了这个问题吗?
谢谢!
It's coming across to me one awkward issue.
I made this project a while ago with React using Parcel to build.
Now after a couple of months I tried to start the project and it gave me some errors building.
I download again the project from the repository and the parcel started to build again for a couple of hours and the same error came up again. Once again, I download the project from the repository and it start to run again, but without any change made in the project...it started to give again the same Build Error.
Did some of you had this issue?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(此答案是对新错误
当 您将项目升级到Parcel 2.5.0时)运行
包裹索引。如果全局版本仍然
2.0.0-rc0
(2021年8月发布),您的发现是我所获得的错误,并尝试使用最新版本的@parcel/config -default
(安装在项目中),因为“ nofollow noreferrer”> Compresser插件支持于2021年9月添加。从原始屏幕截图中,您似乎已经在
package.json.json
...通过运行
npm npm运行start start - 这将使用那里安装的包裹(2.5.0)版本。
(This answer is in response to the New Error you get after upgrading the project to parcel 2.5.0)
When you run
parcel index.html
, you'll be invoking the version of parcel that's installed globally, not the one locally specified bypackage.json
. The error your getting is what I'd expect if the global version was still2.0.0-rc0
(released August 2021) was run and tried to use the latest version of@parcel/config-default
(installed in your project), because compressor plugin support was added in September 2021.From the original screenshots, it looks like you already have a "start" command in your
package.json
...Invoke it by running
npm run start
- this will use the version of parcel (2.5.0) installed there.