Npm install似乎加载了材料2.0.0-beta3而不是beta.2。 Beta3具有angular4依赖性,这是一个问题,因为我使用angular2。
package.json如下:
"dependencies": {
"@angular/animations": "^4.0.3",
"@angular/common": "^2.4.0",
"@angular/compiler": "^2.4.0",
"@angular/core": "^2.4.0",
"@angular/forms": "^2.4.0",
"@angular/http": "^2.4.0",
"@angular/platform-browser": "^2.4.0",
....
},
"devDependencies": {
"@angular/cli": "1.0.0-rc.4",
"@angular/compiler-cli": "^2.4.0",
"@angular/material": "^2.0.0-beta.2",
...
}
要检查版本,我使用以下命令: ng --version
@angular/cli: 1.0.0-rc.4
node: 6.10.1
os: win32 x64
@angular/animations: 4.0.3
@angular/common: 2.4.10
@angular/compiler: 2.4.10
@angular/core: 2.4.10
@angular/forms: 2.4.10
@angular/http: 2.4.10
@angular/platform-browser: 2.4.10
@angular/platform-browser-dynamic: 2.4.10
@angular/router: 3.4.10
@angular/cli: 1.0.0-rc.4
@angular/compiler-cli: 2.4.10
@angular/material: 2.0.0-beta.3
是否还有其他地方可以控制package.json以外的软件包?