Unexpected value ' ' imported by the module ' '. Please add a @NgModule annotation

It means it doesn't recognise it as a module. Try this:

import {HttpClientModule} from '@angular/common/http';

It should be HttpClientModule , Change,

From

imports: [BrowserModule, IonicModule.forRoot(MyApp), HttpClient],

To

imports: [BrowserModule, IonicModule.forRoot(MyApp), HttpClientModule],

make sure you've added

import { HttpClientModule, HttpClient } from '@angular/common/http';