繁体   English   中英

Ionic v5 到 v6 更新失败?

[英]Ionic v5 to v6 update failed?

我有一个 ionic 5 项目,需要将其更新到 V6,我遵循了官方文档指南,但是当我尝试将 Angular 更新到最新版本时,它失败并出现以下错误,

C:\Users\Documents\WRepo>npx @angular/cli@13 update @angular/core@13 @angular/cli@13 The installed local Angular CLI version is older than the latest stable version. Installing a temporary version to perform the update. √ Package successfully installed. internal/modules/cjs/loader.js:892   throw err;   ^

Error: Cannot find module 'C:\Users\Documents\WRepo\'C:\Users\AppData\Local\Temp\angular-cli-packages-qTXpp3\node_modules\@angular\cli\bin\ng.js''
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {   code: 'MODULE_NOT_FOUND',   requireStack: [] }

是什么导致了这个错误,我怎样才能成功更新离子版本?

提前致谢。

我认为 Ionic 更新文档不是太详细。 这就是 angular CLI 的问题。 您应该根据官方 angular 更新进行更新。

https://update.angular.io/

您要从哪个 angular 版本更新? 如果这不起作用,请尝试删除 CLI 并清除缓存

npm uninstall -g @angular/cli
npm cache clean --force
npm cache verify

然后安装 CLI v13。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM