[error] Error: Package "@ionic/angular-toolkit" has no builders defined.}
at WorkspaceNodeModulesArchitectHost.resolveBuilder (C:\Users\Lenovo\Documents\krishikhoj\krishikhoj-ionic-app\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js:121:19)
at RunCommand.runSingleTarget (C:\Users\Lenovo\Documents\krishikhoj\krishikhoj-ionic-app\node_modules\@angular\cli\models\architect-command.js:245:53)
at async RunCommand.runArchitectTarget (C:\Users\Lenovo\Documents\krishikhoj\krishikhoj-ionic-app\node_modules\@angular\cli\models\architect-command.js:295:24)
at async RunCommand.validateAndRun (C:\Users\Lenovo\Documents\krishikhoj\krishikhoj-ionic-app\node_modules\@angular\cli\models\command.js:136:22)
at async runCommand (C:\Users\Lenovo\Documents\krishikhoj\krishikhoj-ionic-app\node_modules\@angular\cli\models\command-runner.js:224:24)
at async default_1 (C:\Users\Lenovo\Documents\krishikhoj\krishikhoj-ionic-app\node_modules\@angular\cli\lib\cli\index.js:70:31)
4条答案
按热度按时间8cdiaqws1#
尝试安装-npm安装@ionic/cordova-builders
然后转到“ionic-cordova-build”和“ionic-cordova-serve”中的angular.json,并替换
“构建器”:“@离子/Angular 工具包:cordova-构建”
与
“施工员”:“@离子/ cordova -助洗剂: cordova -助洗剂”,
hgb9j2n62#
供日后参考:here an explanation以及如何修复它。我还需要编辑angular.json来更改 cordova 构建器。
ufj5ltwl3#
我用这个解决方案解决了这个问题。
1.运行
sudo npm install -g @ionic/cli@latest
安装最新的离子软件包并运行
npm outdated
以获取过期的软件包。
1.运行
npm install package_name@latest --force
(替换'package_name'与过时的软件包名称)为每个软件包显示在过时的软件包列表1.更新期间忽略任何警告。
提示: 更新所有过时的软件包可避免应用性能低下并提高安全性**
h22fl7wq4#
尝试安装- npm安装@离子/ cordova -建设者
然后后藤angular.json并替换
与