angular-cli: Uncaught Error: Can't resolve all parameters for...

Updated the angular cli to the latest and now my scripts bundle isnt generating… Getting these errors, any ideas ?

Uncaught Error: Can't resolve all parameters for HomepageComponent: (?, ?, ?).
    at CompileMetadataResolver.getDependenciesMetadata (http://localhost:4200/vendor.bundle.js:27650:19)
    at CompileMetadataResolver.getTypeMetadata (http://localhost:4200/vendor.bundle.js:27547:26)
    at CompileMetadataResolver.getDirectiveMetadata (http://localhost:4200/vendor.bundle.js:27320:28)
    at http://localhost:4200/vendor.bundle.js:27730:33
    at Array.forEach (native)
    at CompileMetadataResolver._getEntryComponentsFromProvider (http://localhost:4200/vendor.bundle.js:27729:30)
    at http://localhost:4200/vendor.bundle.js:27687:83
    at Array.forEach (native)
    at CompileMetadataResolver.getProvidersMetadata (http://localhost:4200/vendor.bundle.js:27674:19)
    at http://localhost:4200/vendor.bundle.js:27681:41

my angular-cli.json is


        {
            "project": {
                "version": "1.0.0-beta.16",
                "name": "angular2"
            },
            "apps": [{
                "root": "src",
                "outDir": "dist",
                "assets": "assets",
                "index": "index.html",
                "main": "main.ts",
                "test": "test.ts",
                "tsconfig": "tsconfig.json",
                "prefix": "app",
                "mobile": false,
                "styles": [],
                "scripts": [
                    "../node_modules/jquery/dist/jquery.min.js",
                    "./assets/js/seriously.js",
                    "./assets/js/remodal.js",
                    "./assets/js/wow.min.js",
                    "./assets/js/classie.js",
                    "./assets/js/masonry.js",
                    "./assets/js/owl.carousel.min.js",
                    "./assets/js/particles.min.js",
                    "./assets/js/selectFx.js",
                    "./assets/js/sintaxify.js"
                ],
                "environmentSource": "environments/environment.ts",
                "environments": {
                "source": "environments/environment.ts",
                "dev": "environments/environment.ts",
                "prod": "environments/environment.prod.ts"
                }
            }],
            "addons": [],
            "packages": [],
            "e2e": {
                "protractor": {
                    "config": "./protractor.conf.js"
                }
            },
            "test": {
                "karma": {
                    "config": "./karma.conf.js"
                }
            },
            "defaults": {
                "styleExt": "css",
                "prefixInterfaces": false
            }
        }

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 27

Most upvoted comments

I had the exact same thing. I solved it by removing the Augury plugin.

You need to upgrade your dev environment (latest node, angular-cli, angular)

Augury rolled back to 1.16.0 until this issue is resolved. 1.16.3 is a rollback release.

I had the same error message and it was because of circular dependency injection. 😕 Class1 { constructor (private class2: Class2) { } } Class2 { constructor (private class1: Class1) { } }

It’s wired, I met the same issue. I added @inject(Service) to all parameters in constructor, then the problem solved.

I’m having this issue, but only in normal Chrome. If I try in and incognito window, I do not get the error. WTF 😆

i have same issue

@REPTILEHAUS can you please share what exactly needs to be updated I have below setup:

Angular CLI: 1.5.4
Node: 8.9.1
OS: win32 x64
Angular: 5.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cdk: 5.0.0-rc.2
@angular/cli: 1.5.4
@angular/flex-layout: 2.0.0-beta.11-b01c2d7
@angular/material: 5.0.0-rc.2
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.21
@angular-devkit/schematics: 0.0.37
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.4
@schematics/angular: 0.1.7
typescript: 2.4.2
webpack: 3.8.1