Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

zone.js 0.7.5 prevents proper angular message to be displayed  #595

@beeman

Description

@beeman

Steps to reproduce:

  • npm install -g [email protected]
  • ng new my-test-app
  • Edit src/app/app.component.html
  • Enter invalid html like: <h1>{{title}}</h1

Expected behavior

Uncaught SyntaxError {_nativeError: Error: Template parse errors:
Unexpected character "EOF" ("<h1>
  {{title}}
</h1
[ERROR ->]"): AppCo…}
DirectiveNormalizer.normalizeLoadedTemplate @ directive_normalizer.js:127
DirectiveNormalizer.normalizeTemplateSync @ directive_normalizer.js:104
DirectiveNormalizer.normalizeTemplate @ directive_normalizer.js:81
CompileMetadataResolver._loadDirectiveMetadata @ metadata_resolver.js:207
(anonymous) @ metadata_resolver.js:383
CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata @ metadata_resolver.js:382
(anonymous) @ compiler.js:170
JitCompiler._loadModules @ compiler.js:169
JitCompiler._compileModuleAndComponents @ compiler.js:124
JitCompiler.compileModuleAsync @ compiler.js:90
PlatformRef_._bootstrapModuleWithZone @ application_ref.js:388
PlatformRef_.bootstrapModule @ application_ref.js:363
372 @ main.ts:12
__webpack_require__ @ bootstrap 59266de…:52
699 @ main.bundle.js:264
__webpack_require__ @ bootstrap 59266de…:52
webpackJsonpCallback @ bootstrap 59266de…:23
(anonymous) @ main.bundle.js:1

Actual behavior

Uncaught TypeError: Cannot set property 'stack' of undefined
    at SyntaxError.set [as stack] (http://localhost:4300/vendor.bundle.js:65809:61)
    at assignAll (http://localhost:4300/vendor.bundle.js:86517:29)
    at SyntaxError.ZoneAwareError (http://localhost:4300/vendor.bundle.js:86588:16)
    at SyntaxError.BaseError [as constructor] (http://localhost:4300/vendor.bundle.js:65771:16)
    at new SyntaxError (http://localhost:4300/vendor.bundle.js:5935:16)
    at DirectiveNormalizer.normalizeLoadedTemplate (http://localhost:4300/vendor.bundle.js:15872:19)
    at DirectiveNormalizer.normalizeTemplateSync (http://localhost:4300/vendor.bundle.js:15849:21)
    at DirectiveNormalizer.normalizeTemplate (http://localhost:4300/vendor.bundle.js:15826:43)
    at CompileMetadataResolver._loadDirectiveMetadata (http://localhost:4300/vendor.bundle.js:17068:75)
    at http://localhost:4300/vendor.bundle.js:17244:54
    at Array.forEach (native)
    at CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata (http://localhost:4300/vendor.bundle.js:17243:41)
    at http://localhost:4300/vendor.bundle.js:48134:58
    at Array.forEach (native)
    at JitCompiler._loadModules (http://localhost:4300/vendor.bundle.js:48133:43)

Temporary fix

Downgrade zone.js:

npm install --save [email protected]

Issue over at the Angular CLI repo angular/angular-cli#3975

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