求助:Fork的React应用突发Module parse failed编译错误
React项目编译报错:Module parse failed: Unexpected token in @metamask/utils/node_modules/superstruct/dist/index.mjs
我fork了一个React应用(仓库地址:https://github.com/conedex/frontend),原本运行正常,突然出现如下编译错误:
./node_modules/@metamask/utils/node_modules/superstruct/dist/index.mjs 46:43 Module parse failed: Unexpected token (46:43) You may need an appropriate loader to handle this file type. var path = failure.path; var msg = path.length === 0 ? message : "At path: >".concat(path.join('.'), " -- ").concat(message); _this = _super.call(this, explanation ?? msg); if (explanation != null) _this.cause = msg; Object.assign(_assertThisInitialized(_this), rest);
我尝试过多种解决方案均无效,第20次删除node_modules并重新安装后,项目曾短暂正常运行,但使用yarn重启开发服务器后,又出现相同错误。执行yarn start启动项目,预期能正常运行但失败,恳请各位帮忙解决此问题。
内容的提问来源于stack exchange,提问作者JayCole
相关产品推荐
相关产品推荐

