Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MeteorCLI/lazy-loading not working in AOT w/ Rollup and production mode #1895

Open
enghong opened this issue Mar 19, 2018 · 29 comments
Open

Comments

@enghong
Copy link

enghong commented Mar 19, 2018

I'm trying to build the MeteorCLI/lazy-loading with the latest version of angular-compiler (0.3.0) and meteor 1.6.1

$ git clone https://github.com/Urigo/angular-meteor.git
$ cd angular-meteor/examples/MeteorCLI/lazy-loading
$ meteor update --all-packages
$ meteor npm install
$ AOT=1 ROLLUP=1 meteor --production

And I get the following error:

=> Started proxy.
[client]: ES2015 modules Compilation: 1054.113ms
[client]: HTML Files Compilation: 7.214ms    /
[client]: SCSS Files Compilation: 1.969ms    /
[server]: ES2015 modules Compilation: 362.716ms
[server]: HTML Files Compilation: 0.015ms    -
=> Errors prevented startup:

   While processing files with angular-compilers (for target web.browser):
   packages/angular-typescript-compiler/index.js:400:5: createCompilerHost is not defined
   at AngularTsCompiler.createCompilerHost (packages/angular-typescript-compiler/index.js:400:5)
   at Promise.asyncApply (packages/angular-typescript-compiler/index.js:294:31)
   at
   /Users/enghong/.meteor/packages/meteor-tool/.1.6.1.194wnfx.1kqp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


   While processing files with angular-compilers (for target os.osx.x86_64):
   packages/angular-typescript-compiler/index.js:400:5: createCompilerHost is not defined
   at AngularTsCompiler.createCompilerHost (packages/angular-typescript-compiler/index.js:400:5)
   at Promise.asyncApply (packages/angular-typescript-compiler/index.js:294:31)
   at
   /Users/enghong/.meteor/packages/meteor-tool/.1.6.1.194wnfx.1kqp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


=> Your application has errors. Waiting for file change.
=> Started MongoDB.

Is there something i'm missing there?

@klynicol
Copy link

I'm getting the same error trying to deploy my app to Galaxy. Please help!

@ardatan
Copy link
Collaborator

ardatan commented Mar 20, 2018

Thank you for your contribution! We fixed that issue, could you please run
meteor update --all-packages --allow-incompatible-updates
and try again.

@enghong
Copy link
Author

enghong commented Mar 20, 2018

Thanks for your support! Unfortunately, I still have the same errors :(

$ meteor update --all-packages --allow-incompatible-update
This project is already at Meteor 1.6.1, the latest release.

Changes to your project's package version selections from updating package versions:

angular-compilers            upgraded from 0.3.0 to 0.3.0_1
angular-typescript-compiler  upgraded from 0.3.0 to 0.3.0_1
$ AOT=1 ROLLUP=1 meteor --production
Warning: The --production flag should only be used to simulate production bundling for testing purposes. Use meteor build to create a bundle for production deployment. See:
https://guide.meteor.com/deployment.html
[[[[[ ~/dev/angular-meteor/examples/MeteorCLI/lazy-loading ]]]]]

=> Started proxy.
[client]: ES2015 modules Compilation: 890.028ms
[client]: HTML Files Compilation: 6.773ms    -
[client]: SCSS Files Compilation: 2.403ms    -
=> Started MongoDB.
[server]: ES2015 modules Compilation: 455.514ms
[server]: HTML Files Compilation: 0.020ms    -
=> Errors prevented startup:

   While processing files with angular-compilers (for target web.browser):
   packages/angular-typescript-compiler/index.js:400:5: createCompilerHost is not defined
   at AngularTsCompiler.createCompilerHost (packages/angular-typescript-compiler/index.js:400:5)
   at Promise.asyncApply (packages/angular-typescript-compiler/index.js:294:31)
   at /Users/enghong/.meteor/packages/meteor-tool/.1.6.1.194wnfx.1kqp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


   While processing files with angular-compilers (for target os.osx.x86_64):
   packages/angular-typescript-compiler/index.js:400:5: createCompilerHost is not defined
   at AngularTsCompiler.createCompilerHost (packages/angular-typescript-compiler/index.js:400:5)
   at Promise.asyncApply (packages/angular-typescript-compiler/index.js:294:31)
   at /Users/enghong/.meteor/packages/meteor-tool/.1.6.1.194wnfx.1kqp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


=> Your application has errors. Waiting for file change.

@ardatan
Copy link
Collaborator

ardatan commented Mar 20, 2018

I am sorry again, but could you please try again?

@enghong
Copy link
Author

enghong commented Mar 20, 2018

No problem, here is the result (still the same):

$ meteor update --all-packages --allow-incompatible-update
This project is already at Meteor 1.6.1, the latest release.

Changes to your project's package version selections from updating package versions:

angular-compilers            upgraded from 0.3.0_1 to 0.3.0_2
angular-typescript-compiler  upgraded from 0.3.0_1 to 0.3.0_2
$ AOT=1 ROLLUP=1 meteor --production
Warning: The --production flag should only be used to simulate production bundling for testing purposes. Use meteor build to create a bundle for production deployment. See:
https://guide.meteor.com/deployment.html
[[[[[ ~/dev/angular-meteor/examples/MeteorCLI/lazy-loading ]]]]]

=> Started proxy.
[client]: ES2015 modules Compilation: 945.653ms
[client]: HTML Files Compilation: 6.644ms    /
[client]: SCSS Files Compilation: 2.059ms    /
=> Started MongoDB.
[server]: ES2015 modules Compilation: 493.561ms
[server]: HTML Files Compilation: 0.024ms    \
=> Errors prevented startup:

   While processing files with angular-compilers (for target web.browser):
   packages/angular-typescript-compiler/index.js:400:5: createCompilerHost is not defined
   at AngularTsCompiler.createCompilerHost (packages/angular-typescript-compiler/index.js:400:5)
   at Promise.asyncApply (packages/angular-typescript-compiler/index.js:294:31)
   at /Users/enghong/.meteor/packages/meteor-tool/.1.6.1.194wnfx.1kqp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


   While processing files with angular-compilers (for target os.osx.x86_64):
   packages/angular-typescript-compiler/index.js:400:5: createCompilerHost is not defined
   at AngularTsCompiler.createCompilerHost (packages/angular-typescript-compiler/index.js:400:5)
   at Promise.asyncApply (packages/angular-typescript-compiler/index.js:294:31)
   at /Users/enghong/.meteor/packages/meteor-tool/.1.6.1.194wnfx.1kqp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


=> Your application has errors. Waiting for file change.

@enghong
Copy link
Author

enghong commented Mar 20, 2018

This is not what I did with meteor update --all-packages --allow-incompatible-update?

I'm now at version 0.3.0_2, it seems to be the latest.

Anyway, I restarted from a fresh clone, still the same issue :(

@ardatan
Copy link
Collaborator

ardatan commented Mar 20, 2018

It should be ‘0.3.0_3’, that’s why I asked about update.

@enghong
Copy link
Author

enghong commented Mar 20, 2018

Ah sorry, I'm now at 0.3.0_3:

$ AOT=1 ROLLUP=1 meteor --production
Warning: The --production flag should only be used to simulate production bundling for testing purposes. Use meteor build to create a bundle for production deployment. See:
https://guide.meteor.com/deployment.html
[[[[[ ~/tmp/angular-meteor/examples/MeteorCLI/lazy-loading ]]]]]

=> Started proxy.
[client]: ES2015 modules Compilation: 1205.456ms
[client]: HTML Files Compilation: 9.224ms    -
[client]: SCSS Files Compilation: 2.076ms    -
=> Started MongoDB.
[server]: ES2015 modules Compilation: 374.714ms
[server]: HTML Files Compilation: 0.039ms    -
=> Errors prevented startup:

   While processing files with angular-compilers (for target web.browser):
   /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:583:30: _this.host.getOutputName is not a function
   at getOriginalName (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:583:30)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:628:42)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7
   at Array.forEach (<anonymous>)
   at ReferenceTransformer.ValueTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:655:59)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7
   at Array.forEach (<anonymous>)
   at ReferenceTransformer.ValueTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:655:59)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7
   at Array.forEach (<anonymous>)
   at ReferenceTransformer.ValueTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:655:59)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7
   at Array.forEach (<anonymous>)
   at ReferenceTransformer.ValueTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:655:59)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at StaticSymbolResolver.createResolvedSymbol (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:660:41)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:543:7
   at Array.forEach (<anonymous>)
   at StaticSymbolResolver._createSymbolsOf (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:526:29)
   at StaticSymbolResolver.resolveSymbol (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:122:7)
   at StaticReflector.findSymbolDeclaration (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_reflector.js:154:14)
   at StaticReflector.findDeclaration (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_reflector.js:125:7)
   at StaticReflector.initializeConversionMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_reflector.js:447:14)
   at new StaticReflector (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_reflector.js:65:14)
   at Object.createAotCompiler (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/compiler_factory.js:69:39)
   at AngularCompilerProgram._createCompiler (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/packages/compiler-cli/src/transformers/program.ts:437:22)
   at AngularCompilerProgram.get (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/packages/compiler-cli/src/transformers/program.ts:360:12)
   at Promise.asyncApply (packages/angular-typescript-compiler/index.js:300:5)
   at /Users/enghong/.meteor/packages/meteor-tool/.1.6.1.194wnfx.1kqp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


   While processing files with angular-compilers (for target os.osx.x86_64):
   /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:583:30: _this.host.getOutputName is not a function
   at getOriginalName (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:583:30)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:628:42)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7
   at Array.forEach (<anonymous>)
   at ReferenceTransformer.ValueTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:655:59)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7
   at Array.forEach (<anonymous>)
   at ReferenceTransformer.ValueTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:655:59)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7
   at Array.forEach (<anonymous>)
   at ReferenceTransformer.ValueTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:655:59)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7
   at Array.forEach (<anonymous>)
   at ReferenceTransformer.ValueTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:134:7)
   at ReferenceTransformer.visitStringMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:655:59)
   at visitValue (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/util.js:70:6)
   at StaticSymbolResolver.createResolvedSymbol (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:660:41)
   at /Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:543:7
   at Array.forEach (<anonymous>)
   at StaticSymbolResolver._createSymbolsOf (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:526:29)
   at StaticSymbolResolver.resolveSymbol (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_symbol_resolver.js:122:7)
   at StaticReflector.findSymbolDeclaration (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_reflector.js:154:14)
   at StaticReflector.findDeclaration (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_reflector.js:125:7)
   at StaticReflector.initializeConversionMap (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_reflector.js:447:14)
   at new StaticReflector (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/static_reflector.js:65:14)
   at Object.createAotCompiler (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/node_modules/packages/compiler/esm5/src/aot/compiler_factory.js:69:39)
   at AngularCompilerProgram._createCompiler (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/packages/compiler-cli/src/transformers/program.ts:437:22)
   at AngularCompilerProgram.get (/Users/enghong/tmp/angular-meteor/examples/MeteorCLI/lazy-loading/packages/compiler-cli/src/transformers/program.ts:360:12)
   at Promise.asyncApply (packages/angular-typescript-compiler/index.js:300:5)
   at /Users/enghong/.meteor/packages/meteor-tool/.1.6.1.194wnfx.1kqp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


=> Your application has errors. Waiting for file change.

@klynicol
Copy link

I will run the update first thing when I get home.

@ardatan
Copy link
Collaborator

ardatan commented Mar 20, 2018

@enghong Can I see your package.json file?

@enghong
Copy link
Author

enghong commented Mar 20, 2018

Yes sure :

{
  "private": true,
  "scripts": {
    "start": "meteor run",
    "test": "TEST_BROWSER_DRIVER=phantomjs meteor test --driver-package=ardatan:mocha",
    "test:ci": "TEST_BROWSER_DRIVER=phantomjs meteor test --driver-package=ardatan:mocha --once"
  },
  "dependencies": {
    "@angular/common": "^5.0.3",
    "@angular/compiler": "^5.0.3",
    "@angular/core": "^5.0.3",
    "@angular/forms": "^5.0.3",
    "@angular/platform-browser": "^5.0.3",
    "@angular/platform-browser-dynamic": "^5.0.3",
    "@angular/router": "^5.0.3",
    "@babel/runtime": "^7.0.0-beta.42",
    "core-js": "^2.5.3",
    "meteor-node-stubs": "~0.3.3",
    "meteor-rxjs": "^0.4.8",
    "rxjs": "^5.5.0",
    "zone.js": "^0.8.16"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^5.1.0",
    "@types/chai": "^4.0.8",
    "@types/meteor": "^1.4.12",
    "@types/mocha": "^2.2.44",
    "@types/sinon": "^4.1.0",
    "chai": "^4.1.2",
    "phantomjs-prebuilt": "^2.1.16",
    "sinon": "^4.1.3",
    "typescript": "^2.6.2"
  }
}

@ardatan
Copy link
Collaborator

ardatan commented Mar 20, 2018

Thank you! You make me realize that I have to update those dependencies in lazy-loading together with other example. npm update
I think the problem is the version of angular packages. Could you please reinstall them with the latest versions? I will also update them into latest versions as well in the repo.

@klynicol
Copy link

Ran the update meteor update --all-packages --allow-incompatible-update, now getting this log when trying to deploy

c:\Users\Klynicol\Desktop\024-PSpec>meteor update --all-packages --allow-incompa
tible-update
This project is already at Meteor 1.6.1, the latest release.

Changes to your project's package version selections from updating package
versions:

angular-compilers            upgraded from 0.3.0 to 0.3.1
angular-html-compiler        upgraded from 0.3.0 to 0.3.1
angular-scss-compiler        upgraded from 0.3.0 to 0.3.1
angular-typescript-compiler  upgraded from 0.3.0 to 0.3.1


c:\Users\Klynicol\Desktop\024-PSpec>meteor deploy www.pizzachronicle.com --setti
ngs ./settings.json
Talking to Galaxy servers at https://us-east-1.galaxy-deploy.meteor.com
Deploying your app...
[client]: HTML Files Compilation: 30.229ms   /
[client]: ES2015 modules Compilation: 2179.033ms
AoT Code Generator Created.: 1143.815ms
NgModules Loaded.: 0.092ms
[client]: SCSS Files Compilation: 10.056ms   |
[server]: HTML Files Compilation: 0.014ms    -
[server]: ES2015 modules Compilation: 666.184ms
AoT Code Generator Created.: 553.595ms
NgModules Loaded.: 0.046ms
Modules Analyzed.: 501.463ms
Generating Modules.: 245.365ms
Modules Converted to TypeScript.: 0.211ms
[server]: TypeScript Files Compilation: 1004.401ms
[server]: SCSS Files Compilation: 0.140ms    \

Errors prevented deploying:
While processing files with angular-compilers (for target web.browser):

C:\Users\Klynicol\AppData\Local\.meteor\packages\angular-compilers\0.3.1\plugin.
Angular_Compilers.os\npm\node_modules\meteor\angular-scss-compiler\node_modules\
node-sass\lib\index.js:439:16:
File to read not found or unreadable:
c:/Users/Klynicol/Desktop/024-PSpec/c:/Users/Klynicol/Desktop/024-PSpec/client/i
mports/app/appcss/app.component.scss
at Object.module.exports.renderSync
(C:\Users\Klynicol\AppData\Local\.meteor\packages\angular-compilers\0.3.1\plugin
.Angular_Compilers.os\npm\node_modules\meteor\angular-scss-compiler\node_modules
\node-sass\lib\index.js:439:16)
at Function.compileFile (packages/angular-scss-compiler/index.js:22:17)
at
TsCompilerAotCompilerTypeCheckHostAdapter.compiler._host.loadResource.filePath
(packages/angular-typescript-compiler/index.js:313:38)
at Object.get
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\aot
\compiler_factory.js:78:306)
at DirectiveNormalizer._fetch
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\dir
ective_normalizer.js:95:7)
at
c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\dire
ctive_normalizer.js:292:36
at Array.map (<anonymous>)
at DirectiveNormalizer._loadMissingExternalStylesheets
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\dir
ective_normalizer.js:291:14)
at DirectiveNormalizer._normalizeTemplateMetadata
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\dir
ective_normalizer.js:201:7)
at
c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\dire
ctive_normalizer.js:127:7
at Object.then
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\uti
l.js:171:3)
at DirectiveNormalizer.normalizeTemplate
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\dir
ective_normalizer.js:127:7)
at CompileMetadataResolver.loadDirectiveMetadata
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\met
adata_resolver.js:363:44)
at
c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\meta
data_resolver.js:620:54
at Array.forEach (<anonymous>)
at CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\met
adata_resolver.js:619:16)
at
c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\aot\
compiler.js:91:7
at Array.map (<anonymous>)
at AotCompiler.analyzeModulesAsync
(c:\Users\Klynicol\Desktop\024-PSpec\node_modules\packages\compiler\esm5\src\aot
\compiler.js:91:7)
at Promise.asyncApply
(packages/angular-typescript-compiler/index.js:328:42)
at
C:\Users\Klynicol\AppData\Local\.meteor\packages\meteor-tool\1.6.1\mt-os.windows
.x86_64\dev_bundle\lib\node_modules\meteor-promise\fiber_pool.js:43:40

Looks like I'm back to my original errors before the first update yesterday.

@ardatan
Copy link
Collaborator

ardatan commented Mar 21, 2018

We just updated all the examples and compilers. It was because the version of @angular/compiler-cli and @angular/core packages are not compatible. So you can checkout latest example, and try again. Please let us know if that issue still appears.

@enghong
Copy link
Author

enghong commented Mar 21, 2018

Thank you very much for your support!

On my side, it is better:

$ AOT=1 ROLLUP=1 meteor --production
Warning: The --production flag should only be used to simulate production bundling for testing purposes. Use meteor build to create a bundle for production deployment. See:
https://guide.meteor.com/deployment.html
[[[[[ ~/dev/angular-meteor/examples/MeteorCLI/lazy-loading ]]]]]

=> Started proxy.
[client]: ES2015 modules Compilation: 906.407ms
AoT Code Generator Created.: 935.899ms
NgModules Loaded.: 0.099ms
Modules Analyzed.: 984.880ms
Generating Modules.: 608.255ms
Modules Converted to TypeScript.: 17.504ms
client/imports/polyfills.ts (5, 1): Cannot find name 'global'.
client/imports/app/app.module.ngfactory.ts (71, 78): Property 'ɵ0' does not exist on type 'typeof "client/imports/app/app.module"'.
client/imports/app/app.module.ngfactory.ts (72, 81): Property 'ɵ1' does not exist on type 'typeof "client/imports/app/app.module"'.
client/imports/app/app.module.ngfactory.ts (74, 29): Property 'ɵ2' does not exist on type 'typeof "client/imports/app/app.module"'.
[client]: TypeScript Files Compilation: 3050.961ms
=> Started MongoDB.
The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string
[client]: Rollup: 2700.884msular-compile...  -
[client]: HTML Files Compilation: 8.206ms    /
[client]: SCSS Files Compilation: 0.743ms    /
[server]: ES2015 modules Compilation: 323.887ms
AoT Code Generator Created.: 390.778ms
NgModules Loaded.: 0.022ms
Modules Analyzed.: 293.337ms
Generating Modules.: 195.602ms
Modules Converted to TypeScript.: 0.025ms
[server]: TypeScript Files Compilation: 260.508ms
[server]: Rollup: 151.806msgular-compile...  /
[server]: HTML Files Compilation: 0.012ms..  -
=> Started your app.

=> App running at: http://localhost:3000/

So the app is now running, but there are some warnings regarding the app.module.ngfactory.ts

Then if I go to http://localhost:3000/todoAdd path, I have this error in the console:

[Error] ERROR – TypeError: this.router.events.filter is not a function. (In 'this.router.events.filter(t=>t instanceof Rw)', 'this.router.events.filter' is undefined)
[Error] ERROR – Error: Uncaught (in promise): Error: Cannot find module '/client/imports/app/todo-add/todo-add.module.ngfactory'

In fact, all loadChildren trigger this kind of error.
Any idea of how to fix this.

@enghong
Copy link
Author

enghong commented Mar 21, 2018

@ardatan: I confirm the errors are still there with your latest update (933ef9e)

@ardatan
Copy link
Collaborator

ardatan commented Mar 21, 2018

Is there any problem in case of AOT without Rollup?

@klynicol
Copy link

@ardatan Any suggestion for the errors that I posted above?

@ardatan
Copy link
Collaborator

ardatan commented Mar 21, 2018

@klynicol Your issue is different. It looks our bug with Windows path. We are currently trying to find out the solution for it. For now, in order to keep working with your project, you can use an environment that works with POSIX/Linux, or you can use WSL/Ubuntu bash for Windows which I am currently working with.
@enghong Rollup creates a single bundle for Meteor then Meteor adds that single file in project in case of AOT w/ Rollup option. Rollup's tree shaking eliminates these dynamic-imported modules, so Meteor cannot find them on runtime. We will try to figure out, track updates on this page. In a few days, a new update will be released for this issue.

@ardatan ardatan changed the title MeteorCLI/lazy-loading not working in AOT and production mode MeteorCLI/lazy-loading not working in AOT w/ Rollup and production mode Mar 21, 2018
@klynicol
Copy link

Great, thanks! Can you point me to a tutorial for setting up an environment? Haven't done anything like that before. Also how will that affect a deployment to Galaxy?

@ardatan ardatan added the bug label Mar 21, 2018
@ardatan
Copy link
Collaborator

ardatan commented Mar 21, 2018

@klynicol Actually, it won't have any affect to Galaxy, meteor deploy command creates a build on your local environment, and sends it to Galaxy. So, you can change your environment.
https://docs.microsoft.com/en-us/windows/wsl/install-win10
After you installed Ubuntu Bash, install Meteor and other stuff like you are in Ubuntu, then you can deploy it with same command via Ubuntu Bash on Windows.

@klynicol
Copy link

You are a GOD @ardatan ! Really appreciate the help.

@ardatan
Copy link
Collaborator

ardatan commented Mar 21, 2018

@klynicol You're welcome!
@enghong Could you update your packages after removing standard-minifier-js from your packages(I also updated them on repository), and try again?
meteor remove standard-minifier-js

@enghong
Copy link
Author

enghong commented Mar 21, 2018

Sure, the compilation is still OK:

$ AOT=1 ROLLUP=1 meteor --production
Warning: The --production flag should only be used to simulate production bundling for testing purposes. Use meteor build to create a bundle for production deployment. See:
https://guide.meteor.com/deployment.html
[[[[[ ~/dev/angular-meteor/examples/MeteorCLI/lazy-loading ]]]]]

=> Started proxy.
[client]: ES2015 modules Compilation: 876.641ms
AoT Code Generator Created.: 983.757ms
NgModules Loaded.: 0.142ms
Modules Analyzed.: 1079.455ms
Generating Modules.: 540.116ms
Modules Converted to TypeScript.: 11.580ms
client/imports/polyfills.ts (5, 1): Cannot find name 'global'.
client/imports/app/app.module.ngfactory.ts (71, 78): Property 'ɵ0' does not exist on type 'typeof "client/imports/app/app.module"'.
client/imports/app/app.module.ngfactory.ts (72, 81): Property 'ɵ1' does not exist on type 'typeof "client/imports/app/app.module"'.
client/imports/app/app.module.ngfactory.ts (74, 29): Property 'ɵ2' does not exist on type 'typeof "client/imports/app/app.module"'.
[client]: TypeScript Files Compilation: 8.185ms
=> Started MongoDB.
The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string
[client]: Rollup: 2498.868msular-compile...  /
[client]: HTML Files Compilation: 8.894ms    |
[client]: SCSS Files Compilation: 0.671ms    |
[server]: ES2015 modules Compilation: 327.128ms
AoT Code Generator Created.: 340.962ms
NgModules Loaded.: 0.026ms
Modules Analyzed.: 533.524ms
Generating Modules.: 196.816ms
Modules Converted to TypeScript.: 0.023ms
[server]: TypeScript Files Compilation: 1.977ms
[server]: Rollup: 155.755msgular-compile...  \
[server]: HTML Files Compilation: 0.031ms    \
=> Started your app.

=> App running at: http://localhost:3000/

But on the client, I get:

[Error] ReferenceError: Can't find variable: undefinedundefinedundefinedundefinedundefinedundefined
	fakeLoader.js (app.js:50)
	fileEvaluate (modules-runtime.js:353)
	Global Code (app.js:43966)

@enghong
Copy link
Author

enghong commented Mar 21, 2018

@ardatan No, unfortunately I have a blank page...

@ardatan
Copy link
Collaborator

ardatan commented Mar 22, 2018

@enghong After solving a lot of problems with your contribution, we have another problem about Rollup with Dynamic Imports feature of Meteor. This is due to the difference of Meteor's build of module and Rollup. I recommend you to use the production mode without Rollup which is not enabled by default until we find out a solution.
I released another version of compiler which has no problems on production without Rollup. Please update your packages again, and let me know any other problems you find.

@ardatan ardatan reopened this Mar 22, 2018
@enghong
Copy link
Author

enghong commented Mar 22, 2018

@ardatan Thanks for your support! I update to 0.3.1_2 and I used the production mode without ROLLUP:

$ AOT=1 meteor --production

But on the client, I still have error:

[Error] ERROR – TypeError: this.router.events
                .filter is not a function. (In 'this.router.events
                .filter((event) => event instanceof router_1.NavigationEnd)', 'this.router.events
                .filter' is undefined) — app.component.ts:22

Also, are you intending to re-integreate standard-minifier-js package?

Thanks again for your support!

@ardatan
Copy link
Collaborator

ardatan commented Mar 23, 2018

@enghong There are two cases of AOT build;
First if you are adding production flag you don't need to use AOT env variable, because it is default in production.
In case of development mode, you need to define AOT env variable if you want to use AOT (it is not recommended in development).
By the way, the error you get is not due to the compilers, it is because of the deprecated filter function of Observable. So you can remove that code safely. That code is just for dynamic title change.
Finally, you can add standard-minifier-js if you want to minify only with production flag.

@enghong
Copy link
Author

enghong commented Mar 28, 2018

@ardatan Sorry for my late reply, I was out of town.

It is now working perfectly with AOT=1 meteor --production, thank you very much!
What about ROLLUP, are you intending to fix it in the next versions?

Again, thank you for all your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants