Skip to content

Angular Update 6.0.0-beta.3 to 6.1.3 causes Can't resolve all parameters for SomeComponent (?) #12671

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
AlDrag opened this issue Oct 21, 2018 · 2 comments

Comments

@AlDrag
Copy link

AlDrag commented Oct 21, 2018

Bug Report or Feature Request (mark with an x)

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

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Node: v8.11.1
NPM: v6.4.1
NG: v6.2.5
Operation System: macOS High Sierra

Repro steps

Upgrade our app from v6.0.0-beta.3 to the latest v6 (I've also tried v7) causes the error Can't resolve all parameters for LoginComponent (?). Followed steps from update.angular.io

The log given by the failure

Uncaught Error: Can't resolve all parameters for LoginComponent: (?). at syntaxError (compiler.js:1016) at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver._getDependenciesMetadata (compiler.js:10917) at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver._getTypeMetadata (compiler.js:10810) at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver.getNonNormalizedDirectiveMetadata (compiler.js:10429) at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver._getEntryComponentMetadata (compiler.js:11013) at compiler.js:11004 at Array.forEach (<anonymous>) at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver._getEntryComponentsFromProvider (compiler.js:11003) at compiler.js:10976 at Array.forEach (<anonymous>)

Mention any other details that might be useful

I've also tried updating without using the schematics and I come across the same error. I've assumed we've done something strange in our repo which the update is not liking but there doesn't seem to be any useful errors to help us determine what is wrong. It seems to be Angular depedency injection failing? If I surround ALL constructor service injected parameters with @Inject() then it will work, but obviously that is not a solution. Stackoverflow was no help so I've come here.

@alan-agius4
Copy link
Collaborator

Providing some code examples would be helpful to determine whats going on. However, I think this is not the right repo to report this issue, As it doesn't seems to be related to the CLI per see.

Such errors usually happen because you are injecting something which is not an Injectable, nor Token

@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 8, 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