2017-04-07 24 views
5

tôi đang cố gắng để biên dịch dự án của tôi với AOT, nhưng khi tôi cố gắng lệnhgóc 2: AOT Lỗi Loại: base64 không phải là một chức năng

ngc -p tsconfig-aot.json

nó tạo thư mục AOT với ngFactroy lúc đầu tiên, nhưng khi tôi thay đổi ts chính (như đề cập trên tài liệu góc) cho bootstrap ngmodulefactory tạo mới và biên dịch lại dự án sử dụng cùng một lệnh tôi đang nhận được lỗi sau

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 làm sai điều gì?

Trả lời

6

tôi tìm thấy câu trả lời, js nút của nó làm vấn đề ở đây, AOT đòi hỏi js nút v6 +, tôi chỉ cập nhật nút của tôi và ban hành cố định, chỉ cần gửi bài câu trả lời của tôi nếu có ai phải đối mặt với vấn đề này.

+2

Hy vọng điều này sẽ giúp ai đó: http://stackoverflow.com/a/18412505/4472973 - cách dễ nhất để cập nhật nút js cho cửa sổ –

Các vấn đề liên quan