eduardolima93 / angular2-spotify

Angular2 Service to connect to Spotify Web API
MIT License
20 stars 14 forks source link

An implementation cannot be declared in ambient contexts #2

Open erdemildiz opened 8 years ago

erdemildiz commented 8 years ago

I getting "An implementation cannot be declared in ambient contexts." error while I am trying to use IONIC. I changed import url like below.

import {Injectable, Inject, Optional} from '@angular/core'; import {Http, Headers, Response, Request} from '@angular/http';

ClaudiaDanciu commented 5 years ago

For me, the problem was my old angular-cli version :

npm uninstall -g angular-cli
npm cache clean / npm cache verify npm
install -g @angular /cli@latest npm install

and this one is to update your local project version:

rm -rf node_modules

npm uninstall --save-dev @angular/cli@latest
npm install

try also to install again rxjs and rxjs-compat

OttoTrezza commented 5 years ago

For me, the problem was my old angular-cli version :

npm uninstall -g angular-cli
npm cache clean / npm cache verify npm
install -g @angular /cli@latest npm install

and this one is to update your local project version:

rm -rf node_modules

npm uninstall --save-dev @angular/cli@latest
npm install

try also to install again rxjs and rxjs-compat

I did exactly the same! .. and issue`s gone!!!