@ionic-native/clipboard constructor breaks app

I am trying to use the @ionic-native/clipboard to copy some text in my app. However, once I add private clipboard: Clipboard to my constructor, my app screen turns black in the Ionic Lab with the exception of the tabs on bottom, but the tabs are unresponsive. Below is a screenshot of the app after adding the constructor. The second screenshot is what the app looks when in Google developer mode. I followed the install instructions from https://ionicframework.com/docs/native/clipboard

tab1.page.ts:

import { Component } from '@angular/core';
import { Clipboard } from '@ionic-native/clipboard/ngx';
export class Tab1Page {
   constructor(private clipboard: Clipboard) {}
}


The most frequent cause of “app unresponsive” is uncaught exceptions bringing down the main rendering and reacting thread. Attach a debugger and look for messages in the JavaScript console.

I ended up changing the clipboard type. I think the docs I was pulling up were for Cordova. I ended up changing to the following code and it fixed my problem.

import { Component } from '@angular/core';
import { Clipboard } from '@capacitor/clipboard';

async copyText() {
    Clipboard.write({
      string: document.getElementById('text').textContent
    });
}