简体   繁体   English

错误:在使用 yarn encore dev 时安装刺激以使用 enableStimulusBridge()

[英]Error: Install stimulus to use enableStimulusBridge() while using yarn encore dev

I'm trying to install encore in my symfony 5 project, i followed the instructions in the stimulus bridge repository ( https://github.com/symfony/stimulus-bridge ) but when i try to run yarn encore dev this is what i get :我正在尝试在我的 symfony 5 项目中安装 encore,我按照刺激桥存储库中的说明( https://github.com/symfony/stimulus-bridge )但是当我尝试运行yarn encore dev这就是我得到 :

Running webpack ...运行 webpack ...

Error: Install stimulus to use enableStimulusBridge()错误:安装刺激以使用 enableStimulusBridge()

 yarn add stimulus --dev

Do you have any solution to help me ?你有什么解决方案可以帮助我吗?

The problem you are encountering comes from the fact that the Symfony installation need the version 2.0 of stimulus and the line you are using installs the version 3.0.您遇到的问题来自以下事实:Symfony 安装需要 2.0 版的刺激,而您使用的线路安装了 3.0 版。 I've had the exact same problem today and reading the details of the logs helped my out:我今天遇到了完全相同的问题,阅读日志的详细信息对我有帮助:

Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code

Once that line run I found out that the following line:一旦该行运行,我发现以下行:

yarn add stimulus --dev

was installing the latest version.正在安装最新版本。 If you run:如果你运行:

yarn add stimulus@2.0 --dev

You should have the correct version.你应该有正确的版本。

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

相关问题 Webpack 在刺激 controller 中使用计算名称变量再次构建错误 - Webpack encore build error with computed name variable in stimulus controller 无法使用 Encore 在 Symfony 5.3 上正确安装和使用引导程序 - Unable to properly install and use bootstrap on Symfony 5.3 using Encore "纱线安装命令时出现 ESOCKETTIMEDOUT 错误" - ESOCKETTIMEDOUT error while yarn install command 调用方法表单刺激控制器时出错 - Error while calling method form stimulus controller 尝试将 Tinymce 插件与 webpack encore 一起使用时出错 - Error trying to use Tinymce plugin with webpack encore 使用yarn在带有Docker的Reactjs中“安装\\ r”错误是什么意思? - What does "install\r" error mean in Reactjs with Docker using yarn? 当我使用 webapck5 时,yarn dev 遇到此错误:库名称必须是字符串或字符串数​​组 - when i use webapck5,yarn dev meet this error : Library name must be a string or string array lerna 和 yarn workspace 安装错误 - Install error with lerna and yarn workspace 当我只需要构建时,为什么 yarn 会安装开发依赖项? - Why will yarn install dev dependencies when I just need the builds? 使用 WebPack Encore 和 Symfony 4 在 TWIG 页面上使用功能 Javascript - Use function Javascript on TWIG page using WebPack Encore and Symfony 4
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM