Skip to content
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

Can't resolve all parameters for ApplicationModule: (?). #27531

Closed
kumaresan-subramani opened this issue Dec 7, 2018 · 19 comments
Closed

Can't resolve all parameters for ApplicationModule: (?). #27531

kumaresan-subramani opened this issue Dec 7, 2018 · 19 comments
Labels
area: core Issues related to the framework runtime type: bug/fix
Milestone

Comments

@kumaresan-subramani
Copy link

kumaresan-subramani commented Dec 7, 2018

🐞 bug report

Description

This is my github sample repository [https://github.com/SridharSathaSivam/stackblitz-test] which has simple image as a template.

when i try to run this in a stacblitz sample it throws this error:

Unhandled Promise rejection:
Can't resolve all parameters for ApplicationModule: (?).
; Zone:

; Task:
null
; Value:
Error: Can't resolve all parameters for ApplicationModule: (?).
Error: Can't resolve all parameters for ApplicationModule: (?).
at syntaxError (https://vbwigzjp.github.stackblitz.io/turbo_modules/@angular/compiler@7.0.4/bundles/compiler.umd.js:2617:21)
at CompileMetadataResolver._getDependenciesMetadata

🔬 Minimal Reproduction

step1: open stackblitz link [ https://stackblitz.com/ ]

step2: add my repolink to that [https://stackblitz.com/github/SridharSathaSivam/stackblitz-test]

step3: Run sample the you will get that error

@alexzuza
Copy link
Contributor

alexzuza commented Dec 7, 2018

https://twitter.com/yurzui/status/1055491854488215552

Angular cli doesn't include reflect polyfill starting from Angular 7 and that's correct. But in order to make it work in stackblitz you have to add it manually for a while

@kumaresan-subramani
Copy link
Author

Hi @alexzuza , i have tried adding

import 'core-js/es7/reflect';

But it wont work. is there any option

@alexzuza
Copy link
Contributor

alexzuza commented Dec 7, 2018

Hi @alexzuza , i have tried adding

import 'core-js/es7/reflect';

But it wont work. is there any option

https://stackblitz.com/edit/github-5xs2qx?file=src%2Fpolyfills.ts

@kumaresan-subramani
Copy link
Author

Hi @alexzuza , Thank you so much for this. i have tried wrongly

@kumaresan-subramani
Copy link
Author

kumaresan-subramani commented Dec 7, 2018

is this answer for Why i have add this?:

You don't have reflect metadata polyfill in your app due to Angular performance update. https://blog.angular.io/version-7-of-angular-cli-prompts-virtual-scroll-drag-and-drop-and-more-c594e22e7b8c#f14fhttps://github.com/angular/angular-cli/blob/6e7f4d961f09fb13143aa30aba343a660c578124/packages/schematics/angular/migrations/update-7/polyfill-metadata.ts#L39 … Try adding import 'core-js/es7/reflect'; to polifills.ts

@alexzuza
Copy link
Contributor

alexzuza commented Dec 7, 2018

This issue is duplicate for stackblitz/core#758.
Maybe Angular and Stackblitz teams need to decide on which side it should be fixed

@kumaresan-subramani
Copy link
Author

kumaresan-subramani commented Dec 8, 2018

Hi @alexzuza , but still my sample is not wokring fine.

My issue issue is:
I have render one image in my sample
If i run my sample locally, my sample working fine [ image rendered correctly]

If i run sample like below steps:

step1: open stackblitz link [ https://stackblitz.com/ ]

step2: add my repolink to that [ https://stackblitz.com/github/SridharSathaSivam/stackblitz-test ]

step3: Run sample, image is not rendering

My sample is not working fine which means image is not loading properly

@kumaresan-subramani
Copy link
Author

Hi All,
anyone respond my question?

@alexzuza
Copy link
Contributor

alexzuza commented Dec 9, 2018

My sample is not working fine which means image is not loading properly

@kumaresan-subramani
This issue has nothing to do with Angular. Please follow this issue stackblitz/core#72

@kumaresan-subramani
Copy link
Author

Hi @alexzuza , my sample working fine in local but why it is not in stackblitz

@alxhub alxhub added type: bug/fix area: core Issues related to the framework runtime labels Dec 11, 2018
@ngbot ngbot bot added this to the needsTriage milestone Dec 11, 2018
@alxhub
Copy link
Member

alxhub commented Dec 11, 2018

This issue is on the Stackblitz side.

@yogiekmr
Copy link

Hi @alexzuza , i have tried adding

import 'core-js/es7/reflect';

But it wont work. is there any option

https://stackblitz.com/edit/github-5xs2qx?file=src%2Fpolyfills.ts

its working thanks

@akopchinskiy
Copy link

akopchinskiy commented Jul 16, 2019

@sireyogie

import 'core-js/es7/reflect';
It's not working.
Module not found: Error: Can't resolve 'core-js/es6/reflect'
Module not found: Error: Can't resolve 'core-js/es7/reflect'

core-js v3.1.4

@el-ussif
Copy link

el-ussif commented Jul 17, 2019

@sireyogie

import 'core-js/es7/reflect';
It's not working.
Module not found: Error: Can't resolve 'core-js/es6/reflect'
Module not found: Error: Can't resolve 'core-js/es7/reflect'

core-js v3.1.4

Add this in your polyfills.ts file
import 'core-js/es/reflect';

@briosheje
Copy link

Using core-js 3.2.0, angular 8.2.1 and polyfilling these:

// Internet Explorer 9 support
import 'ie-shim';

// IE9, IE10 and IE11 requires all of the following polyfills.
import 'core-js/es/symbol';
import 'core-js/es/object';
import 'core-js/es/function';
import 'core-js/es/parse-int';
import 'core-js/es/parse-float';
import 'core-js/es/number';
import 'core-js/es/math';
import 'core-js/es/string';
import 'core-js/es/date';
import 'core-js/es/array';
import 'core-js/es/regexp';
import 'core-js/es/map';
import 'core-js/es/weak-map';
import 'core-js/es/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js';  // Run `npm install --save classlist.js`.

// Evergreen browsers require these.
import 'core-js/es/reflect';

I still encounter the issue, it seems there might be some limit scenarios where just importing reflect won't work, not sure whether I'm the only one encountering the issue.

@akopchinskiy
Copy link

@briosheje Nobody uses IE nowadays.

@briosheje
Copy link

@akopchinskiy is that related to the issue in any way? However, as a side note, some people still uses IE, in my case some customer does, but that's not the issue, the issue is that upgrading from angular 7 to angular 8 is being slightly harder than expected (to me), since I can't come up with a solution for that issue.

It's probably rather related to webpack, it's just to mention that the proposed solution might not work in all the cases, since in my case reflect is required, but I still get the error.

@philly-vanilly
Copy link

I am getting this in a lib, not an app. It doesn't even have a polyfills file to add the polyfill to. I wish the error message was more descriptive

@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 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: core Issues related to the framework runtime type: bug/fix
Projects
None yet
Development

No branches or pull requests

8 participants