ctorParameters.map is not a function in angular2-mdl

前端 未结 6 1597
广开言路
广开言路 2020-11-28 13:29

I\'m trying to use angular2-mdl with angular-cli. I imported MdlModule in app.module.ts.

When I try to use

6条回答
  •  北海茫月
    2020-11-28 14:22

    I was able to figure out the cause of this issue by looking at the error report from ng build:

    npm WARN @angular/platform-server@2.4.4 requires a peer of @angular/core@2.4.4 but none was installed.
    

    This helped me realize that one of my packages expected Angular to be at v2.4.4, but I'm using v2.0.1. I updated my package.json to have both packages set to my core version like this:

    "dependencies": {
        "@angular/core": "2.0.1",
        "@angular/platform-server": "2.0.1",
    }
    

    Your issue might not be with @angular/platform-server, but I hope this helps debug it

提交回复
热议问题