构建离子应用程序时出现插件错误 [英] Plugin error while building ionic app
问题描述
在构建 ionic 应用程序期间,显示此错误:
during build ionic app, this error is shown:
从 CLI 插件 (@ionic/cli-plugin-cordova) 执行命令期间发生错误.你的插件可能已经过时.类型错误:env.runcmd 不是函数
Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of date. TypeError: env.runcmd is not a function
推荐答案
此错误信息表明 Ionic CLI 版本与其他 CLI 插件不兼容(请参阅 https://github.com/ionic-team/ionic/issues/12561).
This error message indicates that the Ionic CLI version is incompatible with other CLI plugins (see https://github.com/ionic-team/ionic/issues/12561).
请在您的项目目录(package.json 所在的位置)中运行以下命令:
Please run the following commands in your project directory (where you package.json is):
npm i -g ionic@latest
npm i --save-dev --save-exact ionic@latest
这将在全球和本地安装最新的 Ionic CLI 版本(当前为 3.7.0).之后,错误应该不再发生.
This will install the latest Ionic CLI version (currently 3.7.0) globally and locally. After that the error should no longer occur.
这篇关于构建离子应用程序时出现插件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!