Cannot destructure property 'pos' of 'file.referencedFiles[index]' as it is undefined

Discussão em 'Angular' iniciado por Jeanluca Scaljeri, Maio 6, 2025.

  1. When I create a monorepo like

    $> npx create-nx-workspace@latest


    Then I create an angular app:

    $> nx g @nx/angular:app apps/frontend


    Now when I do

    $> nx serve frontend


    I get the following error

    │ ✘ [ERROR] Cannot destructure property 'pos' of 'file.referencedFiles[index]' as it is undefined. [plugin angular-compiler] █
    │
    █
    │ node_modules/typescript/lib/typescript.js:125339:9:
    █
    │ 125339 │ ({ pos, end } = file.referencedFiles[index]);
    ...


    Any suggestions why NX creates a not working angular app?

    Continue reading...

Compartilhe esta Página