angular2-grid目录未被安装

时间:2017-02-23 09:28:01

标签: node.js angular

我对角度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   需要一个zone.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 个答案:

答案 0 :(得分: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": {}
}

答案 1 :(得分:0)

您现有的Angular versionRXJS version低于角网格要求的值。要么使用较旧版本的角度网格,要么尽可能更新项目

要将您的angular2-grid添加为package.json中的依赖项,您需要执行

npm install angular2-grid --save