Capacitor Camera not working

I am having an issue with capacitor’s camera( I am using Vue if that matters). It was working in the past but now I am getting ChunkLoadError: Loading chunk node_modules_ionic_pwa-elements_dist_esm-es5_pwa-camera-modal_entry_js failed.

I’ve attempted to delete node_modules and run npm install, I’ve also noticed in main.ts when i comment out defineCustomElements(window); It brings up my folder to select a photo. This is my takePhoto function that used to work:

  const takePhoto = async () => {
        try{
            const photo = await Camera.getPhoto({
                resultType: CameraResultType.Uri,
                source: CameraSource.Camera,
                quality: 100,
            });
            const fileName = Date.now() + '.jpeg';
            const savedFileImage = {
                id: Math.random(),
                filepath: fileName,
                webviewPath: photo.webPath,
                is_featured: false
            };

            photos.value = [savedFileImage, ...photos.value];
            updatePropertyImages(savedFileImage)
        } catch (e){
            console.log("No Photos taken");
        }

    };

    return {
        photos,
        takePhoto,
    };

I am not sure what else to do at this point. Could anyone please help? I can provide more info/code if needed.

Thank you

TypeError: can’t access property “isProxied”, a is undefined - I also just noticed this in my console errors.

Tried putting the pwa elements script tags in my index.html as well

After some digging and poking around I realized I needed a .prevent on my @click directive. Mods can close this topic.

 <button class="photos__btn" @click.prevent="takePhoto()">
      <font-awesome-icon class="create__icon" :icon="faCamera" size="2xl"></font-awesome-icon>
      Add Property Images
    </button>