Skip to content

bug: dynamic import cannot be analyzed by Vite #31200

Closed as duplicate
Closed as duplicate

Description

@sake12

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

After upgrading to the newest Angular 22, I get this warning.
The project builds correctly.

Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
  ➜  Local:   http://localhost:8100/
  ➜  press h + enter to show help
11:34:18 [vite] (client) warning:
XXXX/.angular/cache/22.0.0/app/vite/deps/chunk-2MXYR5FW.js
1150 |      }
1151 |    }
1152 |    return import("./".concat(a, ".entry.js").concat("")).then((function(e2) {
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1153 |      {
1154 |        cmpModules.set(a, e2);
The above dynamic import cannot be analyzed by Vite.
See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.

  Plugin: vite:import-analysis
  File: XXXX/.angular/cache/22.0.0/app/vite/deps/chunk-2MXYR5FW.js?v=72f710d2


Expected Behavior

Could you remove this warning?

Steps to Reproduce

Upgrade to the newest Angular.

Code Reproduction URL

none

Ionic Info

Also get this error in ionic info, but I will create another issue:

[WARN] Error loading @angular-devkit/build-angular package.json: Error: Cannot find module
       '@angular-devkit/build-angular/package.json'

       Require stack:
       - XXX\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
       - XXX\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
       - XXX\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
       - XXX\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:

   Ionic CLI                     : 7.2.1 (XXX\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 8.8.9
   @angular-devkit/build-angular : not installed
   @angular-devkit/schematics    : 22.0.0
   @angular/cli                  : 22.0.0
   @ionic/angular-toolkit        : 12.3.0

Capacitor:

   Capacitor CLI      : 8.4.0
   @capacitor/android : 8.4.0
   @capacitor/core    : 8.4.0
   @capacitor/ios     : 8.4.0

Utility:

   cordova-res : not installed globally
   native-run  : 2.0.3

System:

   NodeJS : v26.2.0 (C:\Program Files\nodejs\node.exe)
   npm    : 11.16.0
   OS     : Windows 10

Additional Information

No response

Activity

  1. ShaneK commented on Jun 9, 2026

    @ShaneK
    Member

    Angular 22 is not yet supported by Ionic Framework, that's why you're receiving this problem. Angular 22 will be supported in v9.

  2. ionitron-bot commented on Jul 9, 2026

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  3. locked and limited conversation to collaborators on Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions