簡體   English   中英

ubuntu下不兼容的node.js上的symfony encore安裝返回錯誤

[英]symfony encore installation return errors on incompatible node.js under ubuntu

安裝新的 symfony 5.4 后

composer create-project symfony/website-skeleton myprojectname-sf5.4 ^5.4.9

我按照https://symfony.com/doc/current/frontend/encore/installation.html頁面中的說明安裝了encore

composer require symfony/webpack-encore-bundle

然后

yarn install

返回此錯誤:

error @symfony/webpack-encore@2.1.0: The engine "node" is incompatible with this module. \
Expected version "^12.13.0 || >=14.0.0". Got "10.19.0"

即使https://symfony.com/doc/current/frontend/encore/installation.html頁面還提到:“首先確保安裝 Node.js”,我認為我的實際節點還可以(以前的 symfony 項目工作正常) .

另一點是,即使我將我的 ubuntu 從仿生升級到焦點,默認 ubuntu 存儲庫中安裝的 node.js 已被棄用-> 10.19.0

最后,我刪除了舊的 nodejs,然后與n一起安裝(或者對於法國用戶,在 ubuntu 幫助中: https ://doc.ubuntu-fr.org/nodejs#au_moyen_du_gestionnaire_de_versions_n)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM