1

我正在使用 ionic 4,并且在项目中安装了 7 个插件。我想使用一个命令一次更新所有插件。

我尝试使用离子状态重置但收到此错误。

E:\project\demo>ionic state reset
[ERROR] ionic state has been removed.

    We recommend using Cordova directly to manage Cordova plugins and platforms.
    The following commands fulfill the old ionic state functionality:

         ionic cordova platform save   | save existing installed platforms to config.xml
         ionic cordova plugin save     | save existing installed plugins to config.xml
         ionic cordova platform --help | view help page for managing Cordova platforms
         ionic cordova plugin --help   | view help page for managing Cordova plugins
         ionic cordova prepare         | install platforms and plugins listed in config.xml

    See https://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/ for detailed information.

看起来这在 ionic 4 中不起作用,那么有什么方法可以更新 Ionic 4 中的插件吗?

4

1 回答 1

2

清除插件文件夹,然后调用cordova prepare.

rm -rf plugins/
ionic cordova prepare

它对我有用!

于 2019-12-18T17:13:11.087 回答