Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nativescript Cannot find module 'nativescript-angular/http'

I am following the NativeScript tutorial here:

Native Script Angular - Chapter 3

I'm having an error when trying to import nativescript-angular/http. it says Cannot find module 'nativescript-angular/http'. Am I missing anything? I noticed that there is not http.js under node_modules/native-script-angular/http.js.

enter image description here

Any help would be appreciated.

like image 982
PinoyCoder Avatar asked Aug 26 '16 01:08

PinoyCoder


1 Answers

I am pretty sure that the version of Angular you are using are no longer support 'http' service, try to use 'http-client' instead.

import { NativeScriptHttpClientModule } from "nativescript-angular/http-client";

Or use Angular version 5 or older.

like image 182
Matan Shushan Avatar answered Oct 13 '22 02:10

Matan Shushan