2017-02-23 69 views
0

我对angular 2比较新。我想使用angular2-grid目录。我所做的是使用所有必要的起始文件为我的应用程序创建一个文件夹,然后运行npm-install。我输入npm start后,安装完成并演示应用程序正在工作。然后我想要设置angular2-grid并且在official website正在说使用它,您只需运行npm install angular2-grid。我想,但我得到了像一些警告:angular2-grid目录没有安装

NPM WARN [email protected]需要的同行@角/核心@^2.4.4 但没有安装。 npm WARN [email protected]需要[email protected]^5.0.1的对等方 ,但没有安装。 npm WARN [email protected] 需要[email protected]^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": {} 
} 

感谢

+0

你可以分享你的包以.json? –

+0

@suraj我在 – Dea

+0

以下发布它,你现有的角度版本和rxjs版本低于'角栅格'要求的版本。如果可能,请选择旧版本的'angular-grid'或更新您的项目 –

回答

0

现有Angular versionRXJS version比什么角度,电网需要更低。无论是去旧版本的角度电网的或更新您的项目,如果可能的

为了您angular2网添加为在的package.json依赖你需要做的

npm install angular2-grid --save 
0
{ 
"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": {} 
} 
+0

编辑问题。 –

+0

@suraj对我来说似乎很陌生的是,angular2-grid作为** node_modules **目录中的库存在。我已经安装了它吗? – Dea

+0

是的..它被添加为package.json中的依赖项,您需要执行'npm install angular2-grid --save' –