[英]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.