1

デプロイのために「meteor build …/output --server-only」を実行すると、次のエラーが表示されます。this.compilerCli.createCompilerHost is not a function

プロジェクト Meteor@1.5.4.1 を Meteor@1.6.1.1 にアップグレードし、angular2 コンパイラを削除して angular コンパイラを追加し、関連する変更を加えました。プロジェクトは完全に実行されていますが、デプロイ用のビルドでエラーがスローされます。meteor のバージョンは 1.5.4.1 ですが、問題ありませんでした。

Ubuntu のバージョン: Ubuntu 17.10

Meteor バージョン: METEOR@1.6.1.1

角度バージョン: 4.4.7

edge@edge-VirtualBox:~/Repos/webapp-ui$ meteor build ../output --server-only
[client]: Collecting TypeScript source files: 2.898ms
TypeScript Host Created.: 0.436ms
TypeScript Program Created.: 1831.779ms
[client]: HTML Files Compilation: 105.252ms  |
[client]: SCSS Files Compilation: 232.564ms  |
WARN: Output exceeds 32000 characters        \
[server]: Collecting TypeScript source files: 2.736ms
TypeScript Host Created.: 0.073ms
TypeScript Program Created.: 245.550ms
[server]: HTML Files Compilation: 0.020ms    |
[server]: SCSS Files Compilation: 0.038ms    |
Errors prevented bundling:                    
While processing files with angular-compilers (for target web.browser):
packages/angular-typescript-compiler/index.js:428:29: this.compilerCli.createCompilerHost is not a
function
at AngularTsCompiler.createCompilerHost (packages/angular-typescript-compiler/index.js:428:29)
at Promise.asyncApply (packages/angular-typescript-compiler/index.js:323:31)
at
/home/edge/.meteor/packages/mys_fonts/.0.0.2.150p9hr++os+web.browser+web.cordova/plugin.compileFonts.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:33:40


While processing files with angular-compilers (for target os.linux.x86_64):
packages/angular-typescript-compiler/index.js:428:29: this.compilerCli.createCompilerHost is not a
function
at AngularTsCompiler.createCompilerHost (packages/angular-typescript-compiler/index.js:428:29)
at Promise.asyncApply (packages/angular-typescript-compiler/index.js:323:31)
at
/home/edge/.meteor/packages/mys_fonts/.0.0.2.150p9hr++os+web.browser+web.cordova/plugin.compileFonts.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:33:40

流星パッケージ:

meteor-base@1.3.0 # Packages every Meteor app needs to have
mobile-experience@1.0.5 # Packages for a great mobile UX
mongo@1.4.2 # The database Meteor supports right now
reactive-var@1.0.11 # Reactive variable for tracker
jquery@1.11.10 # Helpful client-side library
tracker@1.1.3 # Meteor’s client-side reactive programming library

standard-minifier-css@1.4.0 # CSS minifier run for production mode
es5-shim@4.7.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.10.6 # Enable ECMAScript2015+ syntax in app code

mys:fonts
check@1.3.0
fortawesome:fontawesome
twbs:bootstrap
mrt:moment-timezone
dynamic-import@0.3.0
abernix:standard-minifier-js
browser-policy@1.1.0
momentjs:moment
session@1.1.7
http@1.4.0
angular-compilers@0.3.2

助けてくれてありがとう。よろしく!

4

1 に答える 1

0

angular meteor アプリのバンドルは、開発モードで実行するよりもはるかに手間がかかります。開発モードで完全に正常に動作するアプリで複雑な問題が発生しています。

エラーは、compilerhost がどこから来ているのか、角度のある cli または typescript が欠落しているように見えます。

角流星レポを引用するには:

Angular の compiler-cli およびその他のライブラリは、このパッケージのピア依存関係であるため、プロジェクトに追加する必要があります。

$ meteor npm install @angular/core @angular/common @angular/compiler @angular/compiler-cli typescript --save-dev

于 2018-07-29T00:18:50.957 に答える