Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 2 : AOT TypeError: base64 is not a function

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 ?

like image 595
Dinesh Shah Avatar asked Apr 07 '17 10:04

Dinesh Shah


1 Answers

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.

like image 134
Dinesh Shah Avatar answered Nov 05 '22 12:11

Dinesh Shah