Symfony Encore安装安装返回错误在Ubuntu下的不兼容node.js上
在安装新的Symfony 5.4之后,
composer create-project symfony/website-skeleton myprojectname-sf5.4 ^5.4.9
我安装了 Encore ,如 https://symfony.com/doc/current/frontend/encore/installation.html 页面:
composer require symfony/webpack-encore-bundle
然后
yarn install
返回此错误:
error @symfony/[email protected]: The engine "node" is incompatible with this module. \
Expected version "^12.13.0 || >=14.0.0". Got "10.19.0"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
即使页面也提到:“首先确保安装node.js”,我认为我的实际节点还可以(以前的Symfony Projects可以正常工作)。
另一点是,即使我将ubuntu从仿生学升级到焦点,在默认的ubuntu存储库中安装了node.js,也是 debrecated - > 10.19.0
最后,我删除了旧的nodejs,然后使用 n ((或适用于法国用户,在Ubuntu帮助:)
Even if https://symfony.com/doc/current/frontend/encore/installation.html page also mentioned : "First make sure you install Node.js", I thought my actual node was ok (previous symfony projects works fine).
The other point is, even if I upgrade my ubuntu from bionic to focal, installed node.js in default ubuntu repository is deprecated -> 10.19.0
Finally, I remove old nodejs, then installed with n (or for french users, in ubuntu help : https://doc.ubuntu-fr.org/nodejs#au_moyen_du_gestionnaire_de_versions_n )