Estoy tratando de compilar mi proyecto con aot, pero cuando pruebo el comando
ngc -p tsconfig-aot.json
genera una carpeta aot con ngFactroy al principio, pero cuando cambio main ts (como se menciona en los documentos angulares) para arrancar la nueva ngmodulefactory generada y volver a compilar el proyecto usando el mismo comando, obtengo el siguiente error
TypeError: base64 is not a function at Function.from (native) at Function.from (native) at Object.extractInlineSourceMap (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/tsickle/build/src/source_map_utils.js:33:19) at TsickleCompilerHost.stripAndStoreExistingSourceMap (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/tsickle/build/src/tsickle_compiler_host.js:128:48) at TsickleCompilerHost.getSourceFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/tsickle/build/src/tsickle_compiler_host.js:89:25) at findSourceFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63453:29) at processImportedModules (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63600:25) at findSourceFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63481:17) at processSourceFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63384:27) at processRootFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63271:13) Compilation failedEstoy haciendo algo mal ?
Encontré la respuesta, su nodo js tiene un problema aquí, AOT requiere el nodo js v6 +, solo actualizo mi nodo y el problema se solucionó, solo publico mi respuesta si alguien enfrenta este problema.
Parece ser un problema conocido, consulte el siguiente enlace https://github.com/angular/angular-cli/issues/5711