Skip to content

App Shell builder fails with Ivy #15383

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

Closed
filipesilva opened this issue Aug 20, 2019 · 1 comment · Fixed by #15517
Closed

App Shell builder fails with Ivy #15383

filipesilva opened this issue Aug 20, 2019 · 1 comment · Fixed by #15517

Comments

@filipesilva
Copy link
Contributor

filipesilva commented Aug 20, 2019

The builder for App Shell will fail with Ivy as of 9.0.0-next versions of FW/CLI.

It's hard to reproduce with a new project but it can be seen when using #15384, running the works (basic) spec in packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts, and wrapping the _renderUniversal inside packages/angular_devkit/build_angular/src/app-shell/index.ts in a trycatch, logging the error.

The error will be:

{ Error: Can't resolve all parameters for ApplicationModule: (?).
    at syntaxError (D:\work\packages\compiler\src\util.ts:100:17)
    at CompileMetadataResolver._getDependenciesMetadata (D:\work\packages\compiler\src\metadata_resolver.ts:957:27)
    at CompileMetadataResolver._getTypeMetadata (D:\work\packages\compiler\src\metadata_resolver.ts:836:20)
    at CompileMetadataResolver.getNgModuleMetadata (D:\work\packages\compiler\src\metadata_resolver.ts:680:18)
    at CompileMetadataResolver.getNgModuleSummary (D:\work\packages\compiler\src\metadata_resolver.ts:450:31)
    at D:\work\packages\compiler\src\metadata_resolver.ts:586:44
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (D:\work\packages\compiler\src\metadata_resolver.ts:569:43)
    at CompileMetadataResolver.getNgModuleSummary (D:\work\packages\compiler\src\metadata_resolver.ts:450:31)
    at D:\work\packages\compiler\src\metadata_resolver.ts:548:20
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (D:\work\packages\compiler\src\metadata_resolver.ts:521:43)
    at CompileMetadataResolver.getNgModuleSummary (D:\work\packages\compiler\src\metadata_resolver.ts:450:31)
    at D:\work\packages\compiler\src\metadata_resolver.ts:548:20
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (D:\work\packages\compiler\src\metadata_resolver.ts:521:43)
    at JitCompiler._loadModules (D:\work\packages\compiler\src\jit\compiler.ts:127:49)
    at JitCompiler._compileModuleAndComponents (D:\work\packages\compiler\src\jit\compiler.ts:107:32)
    at JitCompiler.compileModuleAsync (D:\work\packages\compiler\src\jit\compiler.ts:61:33)
    at CompilerImpl.compileModuleAsync (D:\work\packages\platform-browser-dynamic\src\compiler_factory.ts:58:27)
    at compileNgModuleFactory__PRE_R3__ (D:\work\packages\core\src\application_ref.ts:50:19)
    at PlatformRef.bootstrapModule (D:\work\packages\core\src\application_ref.ts:307:12)
    at Object.renderModule (D:\work\packages\platform-server\src\utils.ts:103:37)
    at Promise.resolve.then.then (D:\work\cli\packages\angular_devkit\build_angular\src\app-shell\packages\angular_devkit\build_angular\src\app-shell\index.ts:66:13)
    at ZoneDelegate.invoke (D:\work\cli\node_modules\zone.js\dist\zone-node.js:391:26)
    at Zone.run (D:\work\cli\node_modules\zone.js\dist\zone-node.js:150:43)
    at D:\work\cli\node_modules\zone.js\dist\zone-node.js:910:34
    at ZoneDelegate.invokeTask (D:\work\cli\node_modules\zone.js\dist\zone-node.js:423:31) ngSyntaxError: true }

The error mentions compileNgModuleFactory__PRE_R3__, which makes me think the non-Ivy version FW is being used. This makes sense, because we import @angular/platform-server directly from the app shell builder, and thus will always get the default node entry points and not the ngcc compiled ones.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants