我对角度2比较新 . 我想使用angular2-grid目录 . 我所做的是为我的应用程序创建一个包含所有必要启动文件的文件夹,然后运行 npm-install . 在输入 npm start 之后,安装完成,演示应用程序正在运行 . 然后我想设置angular2-grid并在official website说要使用它你只需要运行 npm install angular2-grid . 我试过了,但我收到了一些警告:
npm WARN angular2-grid@2.0.1需要@ angular / core @ ^ 2.4.4的同伴,但没有安装 . npm WARN angular2-grid@2.0.1需要rxjs@^5.0.1的对等体,但没有安装 . npm WARN angular2-grid@2.0.1需要一个peer.js@^0.7.2的对等体,但没有安装 .
我需要一些帮助来解决这个问题 . 任何建议都是受欢迎的 .
我的 package.json
如下:
{
"name": "product-management",
"version": "1.0.0",
"author": "Deborah Kurata",
"description": "Package for the Acme Product Management sample application",
"scripts": {
"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lint": "tslint ./app/**/*.ts -t verbose",
"lite": "lite-server",
"typings": "typings",
"postinstall": "typings install"
},
"license": "ISC",
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.27",
"zone.js": "^0.6.23",
"bootstrap": "^3.3.6"
},
"devDependencies": {
"concurrently": "^2.2.0",
"lite-server": "^2.2.0",
"tslint": "^3.7.4",
"typescript": "^2.0.2",
"typings": "^1.0.4"
},
"repository": {}
}
谢谢
2 回答
您现有的
Angular version
和RXJS version
低于angular-grid所需的值 . 要么使用较旧版本的角度网格,要么尽可能更新项目要将angular2-grid添加为package.json中的依赖项,您需要这样做