Skip to content

[@analogjs/vite-plugin-angular] Cannot read properties of undefined (reading 'flags') #1836

@dr460nf1r3

Description

@dr460nf1r3

Please provide the environment you discovered this bug in.

Basically, it started to occur after updating deps to Angular 20.

Project in question is this one: https://gitlab.com/garuda-linux/firedragon/firedragon12/-/tree/main/src/apps/newtab?ref_type=heads

Diff to broken: https://gitlab.com/garuda-linux/firedragon/firedragon12/-/merge_requests/3/diffs#diff-content-a830b03e44a55c34333da4759aee3ddca6164820

Which area/package is the issue in?

vite-plugin-angular

Description

Project deps have been updated for Angular 20.
After this, the project can no longer be built.

Tried several things:

  • different Typescript versions (throws on non-compliant versions)
  • downgrade to previous analogjs version
  • relaxing Typescript settings
  • other Vite versions

Looking at AnalogJs, Angular 20 itself seems to be supported perfectly fine.
This project is using Deno, which might contribute to this issue.

Please provide the exception or error you saw

❯ vite build
vite v7.1.2 building for production...
✓ 0 modules transformed.
✗ Build failed in 210ms
error during build:
[@analogjs/vite-plugin-angular] Cannot read properties of undefined (reading 'flags')                                                                                                                                              
    at checkUnreachable (/Users/nijen/Development/misc/firedragon12/node_modules/.deno/[email protected]/node_modules/typescript/lib/typescript.js:49299:23)                                                                        
    at bindChildren (/Users/nijen/Development/misc/firedragon12/node_modules/.deno/[email protected]/node_modules/typescript/lib/typescript.js:47020:9)                                                                             
    at bind (/Users/nijen/Development/misc/firedragon12/node_modules/.deno/[email protected]/node_modules/typescript/lib/typescript.js:48421:9)                                                                                     
    at bindSourceFile2 (/Users/nijen/Development/misc/firedragon12/node_modules/.deno/[email protected]/node_modules/typescript/lib/typescript.js:46656:7)                                                                          
    at bindSourceFile (/Users/nijen/Development/misc/firedragon12/node_modules/.deno/[email protected]/node_modules/typescript/lib/typescript.js:46584:3)                                                                           
    at initializeTypeChecker (/Users/nijen/Development/misc/firedragon12/node_modules/.deno/[email protected]/node_modules/typescript/lib/typescript.js:92066:7)                                                                    
    at createTypeChecker (/Users/nijen/Development/misc/firedragon12/node_modules/.deno/[email protected]/node_modules/typescript/lib/typescript.js:51788:3)                                                                        
    at Object.getTypeChecker (/Users/nijen/Development/misc/firedragon12/node_modules/.deno/[email protected]/node_modules/typescript/lib/typescript.js:126864:42)                                                                  
    at new _NgCompiler (file:///Users/nijen/Development/misc/firedragon12/node_modules/.deno/@[email protected]/node_modules/@angular/compiler-cli/bundles/chunk-6CT454W6.js:3976:73)                                    
    at _NgCompiler.fromTicket (file:///Users/nijen/Development/misc/firedragon12/node_modules/.deno/@[email protected]/node_modules/@angular/compiler-cli/bundles/chunk-6CT454W6.js:3934:16)

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions