angular / in-memory-web-api

The code for this project has moved to the angular/angular repo. This repo is now archived.
MIT License
1.18k stars 232 forks source link

I'd like to use with NativeScript Angular 5.2.0 or 6.0.3 but it have dependencies incompatible #204

Open francisrod01 opened 6 years ago

francisrod01 commented 6 years ago

Hy, I'm trying to use with NativeScript and Angular.

I think it's possible to do that, so I created a discourse about it and I'm trying it in this moment.

The NativeScript discourse link following below:

https://discourse.nativescript.org/t/how-to-mock-http-requests-like-angular-does-as-web/5953

My current dependencies version:

  "nativescript": {
    "id": "org.nativescript.tabletv2ns",
    "tns-android": {
      "version": "4.0.1"
    }
  },
  "dependencies": {
    "@angular/animations": "~5.2.0",
    "@angular/common": "~5.2.0",
    "@angular/compiler": "~5.2.0",
    "@angular/core": "~5.2.0",
    "@angular/forms": "~5.2.0",
    "@angular/http": "~5.2.0",
    "@angular/platform-browser": "~5.2.0",
    "@angular/platform-browser-dynamic": "~5.2.0",
    "@angular/router": "~5.2.0",
    "angular-in-memory-web-api": "^0.6.0",
    "nativescript-angular": "~5.3.0",
    "nativescript-theme-core": "~1.0.4",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.5.2",
    "tns-core-modules": "^4.0.1",
    "zone.js": "~0.8.18"
  },
  "devDependencies": {
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "gts": "^0.5.4",
    "lazy": "1.0.11",
    "nativescript": "^4.0.1",
    "nativescript-dev-typescript": "~0.6.0",
    "tslint": "^5.9.1",
    "typescript": "~2.6.2"
  }
}

When I run that I receive the below output with some warning messages:

npm WARN angular-in-memory-web-api@0.6.0 requires a peer of @angular/common@^6.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-in-memory-web-api@0.6.0 requires a peer of @angular/core@^6.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-in-memory-web-api@0.6.0 requires a peer of @angular/http@^6.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-in-memory-web-api@0.6.0 requires a peer of rxjs@^6.0.0-beta.1 but none is installed. You must install peer dependencies yourself.

As we see, the ^6.0.0-rc.0 version is outdated and now we have as latest ^6.3.0.

Please I want to know it's possible to use this dependency with NativeScript, and if possible, I want to know how to use with ~5.2.0 or ^6.3.0 versions of @angular/** dependencies.