Skip to content

ng build --no-aot --prod does not work in angular-cli 1.5 #8345

@splincode

Description

@splincode

Problem.

Аfter the upgrade to angular-cli 1.5 does not work JIT-mode.
https://github.com/splincode/angular5-demo

AOT:

ng build --aot --prod
cd dist/
http-server
# open in browser http://127.0.0.1:8081

It's work

JIT:

ng build --no-aot --prod
cd dist/
http-server
# open in browser http://127.0.0.1:8081
main.c90f048daaa26da75376.bundle.js:1 Uncaught Error: Unexpected value 't' imported by the module 't'. Please add a @NgModule annotation.
    at p (main.c90f048daaa26da75376.bundle.js:1)
    at main.c90f048daaa26da75376.bundle.js:1
    at Array.forEach (<anonymous>)
    at t.getNgModuleMetadata (main.c90f048daaa26da75376.bundle.js:1)
    at t._loadModules (main.c90f048daaa26da75376.bundle.js:1)
    at t._compileModuleAndComponents (main.c90f048daaa26da75376.bundle.js:1)
    at t.compileModuleAsync (main.c90f048daaa26da75376.bundle.js:1)
    at t.compileModuleAsync (main.c90f048daaa26da75376.bundle.js:1)
    at t.LMZF.t.bootstrapModule (main.c90f048daaa26da75376.bundle.js:1)
    at Object.cDNt (main.c90f048daaa26da75376.bundle.js:1)

Versions.

Angular CLI: 1.5.0
Node: 9.0.0
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.4.2
webpack: 3.8.1

What am I doing wrong?

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulseverity3: broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions