File Downloader Plugin throwing error of 'no class found'

I have been attempting to use file transfer plugin and downloader plugin for the ionic native but each time i click on the download it will return with no class found. in spite of repetitive installation of both Cordova plugins. I want to be able to download a file from a remote server
based on this
file downloader

import { Downloader } from '@ionic-native/downloader/ngx';


constructor(private downloader: Downloader) { }

...

   var request: DownloadRequest = {
          uri: YOUR_URI,
          title: 'MyDownload',
          description: '',
          mimeType: '',
          visibleInDownloadsUi: true,
          notificationVisibility: NotificationVisibility.VisibleNotifyCompleted,
          destinationInExternalFilesDir: {
              dirType: 'Downloads',
              subPath: 'MyFile.apk'
          }
      };


  this.downloader.download(request)
              .then((location: string) => console.log('File downloaded at:'+location))
              .catch((error: any) => console.error(error));

FYI, I’m not familiar with the plugin.

Have you tried another file type? Could it be the the MIME type for an APK have not been configured on the server? I know I had to adjust my IIS settings to allow for downloading of an APK.

@daniel i’ve tried other files like image and i keep getting the same thing like class not found and i really need to get this done on ionic but i am so so stuck and the same thing i am getting for file transfer plugin

When I looked at it the first time, I thought you were downloading an APK. Sorry about that. I pulled up the documentation and it looks like you just copied it into your project. Are you specifying an actual URL where the file is located?

What is the name of your APK?

yes pls. i am actually passing a url of the file i want to download and i am getting the error of no class found.

Can you Post your code?

here is my code snippet @danieldugger

download(filename) {
    // const fileTransfer: FileTransferObject = this.transfer.create();
    let name = filename.split("/");
    let length = name.length;
    const YOUR_URI =
      "http://xxxxxxx.com/dashboardksi/api/uploads/" + name[length - 1];
    // this.storageDirectory = "/Download/";
    console.log("clicked", name);

    var request: DownloadRequest = {
      uri: YOUR_URI,
      title:name,
      description: '',
      mimeType: '',
      visibleInDownloadsUi: true,
      notificationVisibility: NotificationVisibility.VisibleNotifyCompleted,
      destinationInExternalFilesDir: {
          dirType: 'Downloads',
          subPath: name
      }
  };

this.downloader.download(request)
    .then((location: string) => console.log('File downloaded at:'+location))
        .catch((error: any) => console.error(error));
}