Angular build error : [error] TypeError: Cannot destructure property 'routes' of...

Discussão em 'Angular' iniciado por fati, Fevereiro 26, 2025.

  1. fati

    fati Guest

    when building my angular app with ng build I get this error: [error] TypeError: Cannot destructure property 'routes' of '(intermediate value)' as it is undefined. at getAllRoutes (C:\Users\Admin\Desktop\2A\PI\Frontend\ibnosina_front\node_modules@angular\build\src\utils\server-rendering\prerender.js:185:21) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async prerenderPages (C:\Users\Admin\Desktop\2A\PI\Frontend\ibnosina_front\node_modules@angular\build\src\utils\server-rendering\prerender.js:52:84) at async executePostBundleSteps (C:\Users\Admin\Desktop\2A\PI\Frontend\ibnosina_front\node_modules@angular\build\src\builders\application\execute-post-bundle.js:62:83) at async executeBuild (C:\Users\Admin\Desktop\2A\PI\Frontend\ibnosina_front\node_modules@angular\build\src\builders\application\execute-build.js:115:24) at async watch (C:\Users\Admin\Desktop\2A\PI\Frontend\ibnosina_front\node_modules@angular\build\src\builders\application\index.js:70:24) at async Task.task [as taskFn] (C:\Users\Admin\Desktop\2A\PI\Frontend\ibnosina_front\node_modules@angular\build\src\tools\esbuild\utils.js:126:26) at async Task.run (C:\Users\Admin\Desktop\2A\PI\Frontend\ibnosina_front\node_modules\listr2\dist\index.cjs:2143:11)

    the app runs without any problems with ng serve i did not detect any problems with routes ou whatever, however when i build it it fails with this error. Is there anyone who encoutered the same error, or would happen to know what the cause may be. thnx in advance

    dont know the cause yet

    Continue reading...

Compartilhe esta Página