Skip to content
This repository was archived by the owner on Oct 12, 2021. It is now read-only.
This repository was archived by the owner on Oct 12, 2021. It is now read-only.

ng build generates dist/index.html w/ contents of 'undefined' after angular-cli beta.6 upgrade #66

Open
@Splaktar

Description

@Splaktar
  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OS X (Yosemite? El Capitan?)

OS X El Capitan

  1. Versions. Please run ng --version.
angular-cli: 1.0.0-beta.6
node: 4.4.3
os: darwin x64
  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

Created with beta.5 CLI with --mobile and then upgraded with ng init --mobile for beta.6.
Only changes were to merge my existing app back into the files overwritten by the CLI.

Also able to reproduce this in a brand new beta.6 project by doing:

ng new testApp --mobile
ng build
  1. The log given by the failure. Normally this include a stack trace and some
    more information.
$ ng build
Built project successfully. Stored in "dist/".
  1. Mention any other details that might be useful.

Unfortunately there is no error output at all.

Contents of dist/index.html:

undefined

ng build --prod on a new project seems to give an error that might be helpful:

ng build --prod
⠸ BuildingEXCEPTION: Error in :0:0
ORIGINAL EXCEPTION: The selector "app-root" did not match any elements
ORIGINAL STACKTRACE:
Error: The selector "app-root" did not match any elements
    at new BaseException (/Users/splaktar/Git/tf/testApp/node_modules/@angular/platform-browser/src/facade/exceptions.js:17:23)
    at NodeDomRenderer.DomRenderer.selectRootElement (/Users/splaktar/Git/tf/testApp/node_modules/@angular/platform-browser/src/dom/dom_renderer.js:79:23)
    at DebugDomRenderer.selectRootElement (/Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/debug/debug_renderer.js:19:39)
    at DebugAppView.AppView.selectOrCreateHostElement (/Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/linker/view.js:88:41)
    at DebugAppView._View_AppComponent_Host0.createInternal (AppComponent_Host.template.js:12:21)
    at DebugAppView.AppView.create (/Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/linker/view.js:66:21)
    at DebugAppView.create (/Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/linker/view.js:259:44)
    at ComponentFactory.create (/Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/linker/component_factory.js:143:36)
    at /Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/application_ref.js:314:44
    at /Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/application_ref.js:292:26
    at ZoneDelegate.invoke (/Users/splaktar/Git/tf/testApp/node_modules/zone.js/dist/zone-node.js:281:29)
    at Object.NgZoneImpl.inner.inner.fork.onInvoke (/Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/zone/ng_zone_impl.js:45:41)
    at ZoneDelegate.invoke (/Users/splaktar/Git/tf/testApp/node_modules/zone.js/dist/zone-node.js:280:35)
    at Zone.run (/Users/splaktar/Git/tf/testApp/node_modules/zone.js/dist/zone-node.js:174:44)
    at NgZoneImpl.runInner (/Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/zone/ng_zone_impl.js:76:71)
    at NgZone.run (/Users/splaktar/Git/tf/testApp/node_modules/@angular/core/src/zone/ng_zone.js:223:66)
ERROR CONTEXT:
DebugContext {
  _view: 
   DebugAppView {
     clazz: [Function: _View_AppComponent_Host0],
     componentType: 
      RenderComponentType {
        id: 'gms-0',
        templateUrl: '',
        slotCount: 0,
        encapsulation: 0,
        styles: [] },
     type: 0,
     viewUtils: 
      ViewUtils {
        _renderer: [Object],
        _appId: 'gms',
        _nextCompTypeId: 1,
        sanitizer: DomSanitizationServiceImpl {} },
     parentInjector: 
      ReflectiveInjector_ {
        _debugContext: null,
        _constructionCounter: 40,
        _proto: [Object],
        _parent: [Object],
        _strategy: [Object] },
     declarationAppElement: null,
     cdMode: 2,
     contentChildren: [],
     viewChildren: [],
     viewContainerElement: null,
     cdState: 2,
     destroyed: false,
     ref: ViewRef_ { _view: [Circular] },
     renderer: DebugDomRenderer { _delegate: [Object] },
     staticNodeDebugInfos: [ [Object] ],
     _currentDebugContext: [Circular],
     context: {},
     _hasExternalHostElement: true,
     projectableNodes: [] },
  _nodeIndex: 0,
  _tplRow: 0,
  _tplCol: 0 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions