Meteor build fails while processing files with angular-compilers: createCompilerHost is not a function

320 Views Asked by At

When I do ‘meteor build …/output --server-only’ for deploying, I am getting the error: this.compilerCli.createCompilerHost is not a function

I upgraded the project [email protected] to [email protected], removed angular2-compilers and added angular-compilers, and made related changes. The project is running perfectly, however, build for deploying throws the error. While the meteor version is 1.5.4.1, there was no problem.

Ubuntu version: Ubuntu 17.10

Meteor version: [email protected]

Angular version: 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 Packages:

[email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected] # The database Meteor supports right now
[email protected] # Reactive variable for tracker
[email protected] # Helpful client-side library
[email protected] # Meteor’s client-side reactive programming library

[email protected] # CSS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers
[email protected] # Enable ECMAScript2015+ syntax in app code

mys:fonts
[email protected]
fortawesome:fontawesome
twbs:bootstrap
mrt:moment-timezone
[email protected]
abernix:standard-minifier-js
[email protected]
momentjs:moment
[email protected]
[email protected]
[email protected]

I appreciate the help. Regards!

1

There are 1 best solutions below

0
On

Bundling an angular meteor app is much fussier that running in dev mode. I'm having complex issues with my app that works perfectly fine in dev mode.

The error looks to me like it’s missing the angular cli or typescript as that’s where the compilerhost comes from.

To quote the angular meteor repo:

Angular's compiler-cli and other libraries are peer dependencies of this package, so you need to add them to you project.

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