Skip to content

Unexpected token export in ng run [project-name]:app-shell #15182

@vugar005

Description

@vugar005

ng run [project-name]: app-shell

Command (mark with an x)

- [x] generate

- [x] run

Description

This is not duplicate of #8848 .

When I run ng run [project-name]:app-shell
I get Unexpected token export error
Cli even does noes not inform in which file is the problem. So have no clue where to debug.
Tried --verbose but is not supported with this command.
I get no erorrs with ng-build --prod and ng run project-name:build .
Configured app shell with steps;

  1. ng generate universal --client-project=project-name
  2. ng generate app-shell --name=my-shell --universal-project=ngu-app-shell --route=app-shell-path --client-project=project-name

ng run [project-name]: app-shell builds and exports two builds in dist (dist/project-name and dist/project-name-server) but I do not see app-shell in dist/project-name/index.html

Thanks in advance

🔬 Minimal Reproduction

https://github.com/vugar005/app-shell-unexpected-token

🔥 Exception or Error

Unexpected token export without additional details.

🌍 Your Environment

@angular-devkit/architect 0.801.2
@angular-devkit/build-angular 0.801.2
@angular-devkit/build-optimizer 0.801.2
@angular-devkit/build-webpack 0.801.2
@angular-devkit/core 8.1.2
@angular-devkit/schematics 8.1.2
@angular/cdk 8.1.1
@angular/cli 8.1.2
@angular/material 8.1.1
@angular/material-moment-adapter 8.1.1
@ngtools/webpack 8.1.2
@schematics/angular 8.1.2
@schematics/update 0.801.2
rxjs 6.4.0
typescript 3.4.5
webpack 4.35.2

Also tried with
"@angular/cli": "~8.2.0-rc.0.",
"@angular/compiler-cli": "~8.2.0-next.1",
but same problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions