Strapi 开发命令失败 [英] Strapi develop command failed

查看:69
本文介绍了Strapi 开发命令失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置皮带.我成功地创建了应用程序.但是当我运行命令 yarn develop 我得到以下错误

I am trying to set up the strapi. I managed to create app succesfully. But when I run the command yarn develop I get following errors

Error: ./.cache/plugins/strapi-plugin-content-manager/admin/src/components/RepeatableComponent/Banner.js 2:87
Module parse failed: Unexpected token (2:87)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.

到目前为止我尝试过的:

What I have tried so far:

  • 创建了新应用
  • 从这个链接
  • 尝试使用模板创建应用
  • 尝试更新 babel
  • 尝试更新所有软件包

我在 Strapi 网站或 github 问题上找不到任何有用的内容

I haven't find anything helpful on Strapi website or github issues

推荐答案

最后,我设法解决了这个问题.您需要更新 webpack.config.js来自

Finally, I managed to resolve the issue. You need to update the webpack.config.js from

require.resolve('@babel/preset-env')

[require.resolve('@babel/preset-env'),{ targets: "defaults" }]

在模块选项内

这篇关于Strapi 开发命令失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆