错误:(SystemJS)angular2-tag-input(外部库)的XHR错误(404 Not Found)

时间:2017-02-17 23:15:08

标签: angular npm ng2-tag-input

enter image description here

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

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

之前我在为angular2-tag-input进行NPM安装时遇到版本问题,因为它需要特定版本的core 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**
    ],
    .
    .

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

谢谢!

0 个答案:

没有答案