Skip to content

1.5.0 Beta: Error for es2015, while working for es5 #7831

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
AmitMY opened this issue Sep 26, 2017 · 3 comments
Closed

1.5.0 Beta: Error for es2015, while working for es5 #7831

AmitMY opened this issue Sep 26, 2017 · 3 comments

Comments

@AmitMY
Copy link
Contributor

AmitMY commented Sep 26, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.5.0-beta.1
node: 8.4.0
os: win32 x64
@angular/animations: 4.4.2
@angular/common: 4.4.2
@angular/compiler: 4.4.2
@angular/core: 4.4.2
@angular/forms: 4.4.2
@angular/http: 4.4.2
@angular/platform-browser: 4.4.2
@angular/platform-browser-dynamic: 4.4.2
@angular/router: 4.4.2
@angular/cli: 1.5.0-beta.1
@angular/compiler-cli: 4.4.2
@angular/language-service: 4.4.2
typescript: 2.5.2

Repro steps.

Running an app compiled to es5 works, but es2015 gives a zone error.
The app compiles I mean, but it doesn't run.

The log given by the failure.

Unhandled Promise rejection: Cannot convert undefined or null to object ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot convert undefined or null to object
    at Function.getPrototypeOf (<anonymous>)
    at getParentCtor (core.js:1729)
    at ReflectionCapabilities.parameters (core.js:1542)
    at JitReflector.parameters (compiler.js:26622)
    at CompileMetadataResolver._getDependenciesMetadata (compiler.js:15324)
    at CompileMetadataResolver._getFactoryMetadata (compiler.js:15263)
    at CompileMetadataResolver.getProviderMetadata (compiler.js:15533)
    at JitCompiler._compileModule (compiler.js:26063)
    at SyncAsync.then (compiler.js:26013)
    at Object.then (compiler.js:1633) TypeError: Cannot convert undefined or null to object
    at Function.getPrototypeOf (<anonymous>)
    at getParentCtor (http://localhost:4200/vendor.bundle.js:213913:49)
    at ReflectionCapabilities.parameters (http://localhost:4200/vendor.bundle.js:213726:45)
    at JitReflector.parameters (http://localhost:4200/vendor.bundle.js:211735:44)
    at CompileMetadataResolver._getDependenciesMetadata (http://localhost:4200/vendor.bundle.js:200437:73)
    at CompileMetadataResolver._getFactoryMetadata (http://localhost:4200/vendor.bundle.js:200376:51)
    at CompileMetadataResolver.getProviderMetadata (http://localhost:4200/vendor.bundle.js:200646:43)
    at JitCompiler._compileModule (http://localhost:4200/vendor.bundle.js:211176:77)
    at SyncAsync.then (http://localhost:4200/vendor.bundle.js:211126:25)
    at Object.then (http://localhost:4200/vendor.bundle.js:186746:137)

Desired functionality.

If es2015 code compiles well to es5, and runs well, it should be abled to compile to es2015 and run well.

Mention any other details that might be useful.

I am using Chrome Canary.
This is my branch of an OSS project: https://github.com/AnSyn/ansyn/tree/chrome-44
npm run start:backwards works.
npm run start does not.

Even if I use the same configuration for both, and only change the target, I still get the error.

@AmitMY
Copy link
Contributor Author

AmitMY commented Sep 26, 2017

Note!
If I use @angular/[email protected] it works fine.

@AmitMY AmitMY changed the title Error for es2015, while working for es5 1.5.0 Beta: Error for es2015, while working for es5 Sep 26, 2017
@filipesilva
Copy link
Contributor

Duplicate of #7797.

@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 Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants