Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

419
Vistas
Cannot read property 'text' of undefined at NodeObject.getText at getRequiredModulePath

Error occurs while generating browser application bundles (phase: setup). What can cause this error?

Info from console:

Generating browser application bundles (phase: setup)... TypeError: Cannot read property 'text' of undefined at NodeObject.getText (/opt/app-root/src/node_modules/typescript/lib/typescript.js:152697:31) at getRequiredModulePath (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:519:99) at Object.getImportsOfUmdModule (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:510:23) at UmdDependencyHost.extractImports (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/dependencies/umd_dependency_host.js:43:54) at UmdDependencyHost.DependencyHostBase.recursivelyCollectDependencies (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/dependencies/dependency_host.js:85:32) at UmdDependencyHost.DependencyHostBase.collectDependencies (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/dependencies/dependency_host.js:38:22) at DependencyResolver.getEntryPointWithDependencies (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/dependencies/dependency_resolver.js:75:22) at EntryPointCollector.walkDirectoryForPackages (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/entry_point_collector.js:47:52) at EntryPointCollector.walkDirectoryForPackages (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/entry_point_collector.js:75:103) at /opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/program_based_entry_point_finder.js:124:100

Info from angular-errors.log

An error occurred during the build: Error: NGCC failed. at NgccProcessor.process (/opt/app-root/src/node_modules/@ngtools/webpack/src/ngcc_processor.js:139:19) at /opt/app-root/src/node_modules/@ngtools/webpack/src/ivy/plugin.js:129:27 at Hook.eval [as call] (eval at create (/opt/app-root/src/node_modules/tapable/lib/HookCodeFactory.js:19:10), :28:1) at Hook.CALL_DELEGATE [as _call] (/opt/app-root/src/node_modules/tapable/lib/Hook.js:14:14) at Compiler.newCompilation (/opt/app-root/src/node_modules/webpack/lib/Compiler.js:1043:30) at /opt/app-root/src/node_modules/webpack/lib/Compiler.js:1088:29 at Hook.eval [as callAsync] (eval at create (/opt/app-root/src/node_modules/tapable/lib/HookCodeFactory.js:33:10), :22:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/opt/app-root/src/node_modules/tapable/lib/Hook.js:18:14) at Compiler.compile (/opt/app-root/src/node_modules/webpack/lib/Compiler.js:1083:28) at /opt/app-root/src/node_modules/webpack/lib/Compiler.js:508:12 at Compiler.readRecords (/opt/app-root/src/node_modules/webpack/lib/Compiler.js:920:11) at /opt/app-root/src/node_modules/webpack/lib/Compiler.js:505:11 at Hook.eval [as callAsync] (eval at create (/opt/app-root/src/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/opt/app-root/src/node_modules/tapable/lib/Hook.js:18:14) at /opt/app-root/src/node_modules/webpack/lib/Compiler.js:502:20 at Hook.eval [as callAsync] (eval at create (/opt/app-root/src/node_modules/tapable/lib/HookCodeFactory.js:33:10), :22:1) An unhandled exception occurred: NGCC failed. See "/tmp/ng-IZbyMh/angular-errors.log" for further details.

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

There is a error in angular version 12.2.12 and 12.2.11 use 12.2.10 it will fix it or you might have to wait for them to release a new version or fix 12.2.12

Note : if you are using ^12.0.1 in your package.json file, replace it with 12.2.10

over 4 years ago · Santiago Trujillo Denunciar

0

This seems to be caused by the improved UMD module detection added in 12.2.11, pinning the version to 12.2.10 avoids the issue but doesn't address the root cause which is that a dependency probably needs updating.

For us, the package was @auth0/angular-jwt, but it might be different for you. To find it we had to use Linux tool strace to find out which file was opened just before the build failed:

strace -f npm run build 2>&1 | egrep 'open|Error'

(eventually) produced the output

[pid 29550] open(".../node_modules/@auth0/angular-jwt/package.json", O_RDONLY|O_CLOEXEC) = 19
[pid 29550] open(".../node_modules/@auth0/angular-jwt/bundles/core.umd.js", O_RDONLY|O_CLOEXEC) = 19
[pid 29550] open(".../node_modules/@auth0/angular-jwt/bundles/core.umd.js", O_RDONLY|O_CLOEXEC) = 19
[pid 29550] open(".../node_modules/@angular/compiler-cli/bundles/ngcc/__ngcc_lock_file__", O_RDONLY|O_CLOEXEC) = 19
[pid 29550] write(2, "TypeError: Cannot read property "..., 1535TypeError: Cannot read property 'text' of undefined
[pid 29582] open(".../node_modules/@angular/compiler-cli/bundles/ngcc/__ngcc_lock_file__", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 29582] <... open resumed> )        = -1 ENOENT (No such file or directory)
[pid 29393] write(2, "(node:29393) UnhandledPromiseRej"..., 914(node:29393) UnhandledPromiseRejectionWarning: Error: NGCC failed.

the offending module is opened in the run up to the error, and updating it resolved the problem. There's probably a more succinct shell command to get the error, but this was enough for us.

over 4 years ago · Santiago Trujillo Denunciar

0

  1. First move to a latest stable release
  2. remove package-lock.json
  3. npm install
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda