5

i am trying to compile my project with aot , but when i try the command

ngc -p tsconfig-aot.json

it generates aot folder with ngFactroy at first time , but when i change main ts (as mention on angular docs) for bootstrap new generated ngmodulefactory and recompile the project using same command i am getting following 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 failed

am i doing something wrong ?

Dinesh Shah
  • 1,163
  • 1
  • 7
  • 13

2 Answers2

6

i found answer , its node js doing problem here , AOT requires node js v6+ , i just update my node and issue fixed , just posting my answer if anyone facing this issue.

Dinesh Shah
  • 1,163
  • 1
  • 7
  • 13
0

It seems to be a known issue, check the following link https://github.com/angular/angular-cli/issues/5711