0

在此处输入图像描述

当我从 angular2-tag-input 导入其中一个模块时出现此 404 错误,如下所示:

import {RlTagInputModule} from 'angular2-tag-input';

早些时候,我在为 angular2-tag-input 进行 NPM 安装时遇到了版本问题,因为它需要特定版本的核心 angular2 lib。我在 package.json 中进行了更改并安装了所需的依赖项,然后安装了 angular2-tag-input。它安装正确(没有警告或错误)。这是我的package.json

    {
  "name": "Bioshoppe",
  "version": "1.0.0",
  "author": "Sanjiv Kumar",
  "description": "Bioshoppe Application",
  "scripts": {
    "clean": "rimraf app/**/*.js app/**/*.js.map",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "prestart": "npm run clean",
    "start": "tsc && concurrently \"tsc -w\" \"lite-server\" "
  },
  "peerDependencies": {
    "@angular/common": "2.2.4",
    "@angular/core": "2.2.4",
    "@angular/forms": "2.2.4"
  },
  "dependencies": {
    "@angular/common": "2.2.4",
    "@angular/compiler": "2.2.4",
    "@angular/compiler-cli": "2.2.4",
    "@angular/core": "2.2.4",
    "@angular/forms": "2.2.4",
    "@angular/http": "2.2.4",
    "@angular/platform-browser": "2.2.4",
    "@angular/platform-browser-dynamic": "2.2.4",
    "@angular/router": "3.0.0",
    "angular2-tag-input": "^1.2.3",
    "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"
  },
  "devDependencies": {
    "@types/core-js": "^0.9.34",
    "@types/node": "^6.0.41",
    "concurrently": "2.2.0",
    "lite-server": "2.2.2",
    "@angular/platform-server": "2.2.4",
    "awesome-typescript-loader": "^2.2.3",
    "codelyzer": "~0.0.26",
    "node-sass": "^3.10.1",
    "postcss-loader": "^0.13.0",
    "raw-loader": "^0.5.1",
    "rimraf": "^2.5.4",
    "sass-loader": "^4.0.2",
    "source-map-loader": "^0.1.5",
    "tslint": "3.13.0",
    "typescript": "2.0.10",
    "webpack": "^2.1.0-beta.21",
    "webpack-dev-server": "^2.1.0-beta.0"
  }
}

当我在我的下面包含导入app.module并在 NgModule 中的导入下使用该库时,我开始收到错误(请参阅快照)。

    import {RlTagInputModule} from 'angular2-tag-input';
    .
    .

@NgModule({
    imports: [
        BrowserModule,
        routing,
        HttpModule,
        FormsModule,
        **RlTagInputModule**
    ],
    .
    .

请让我知道我犯了什么错误。

谢谢!

4

0 回答 0