capacitor-community / file-opener

Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri. This plugin is similar to cordova-plugin-file-opener2 without installation support.
MIT License
67 stars 13 forks source link

Installation/build issue with 1.0.2 #18

Closed arendjantetteroo closed 2 years ago

arendjantetteroo commented 2 years ago

Describe the bug Installation of 1.0.2 fails due to type: "module" in package.json. Possibly related to the use of typescript in a nextjs project.

To Reproduce See reproducer at https://github.com/arendjantetteroo/capacitor-file-opener-bug Steps to reproduce are in the readme

Expected behavior Can be used as 1.0.1 was.

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context Add any other context about the problem here.

ryaa commented 2 years ago

Thank you for the additional details. I confirm the problem and made the required fix - see https://github.com/capacitor-community/file-opener/pull/19. Can you please install the version of the plugin with the fix and see if it helps. To install please issue the below command: npm install capacitor-community/file-opener#bugfix/build-1.0.2-fails-to-install-in-nextjs-project-with-dist

NOTE: i could successfully build and run you app with my change and the initial error is gone. However there is another one but I assume that this is not related to the file-opener plugin - see below

Screen Shot 2022-11-01 at 09 47 23
arendjantetteroo commented 2 years ago

Thanks @ryaa i can confirm it now properly builds with this fix.

The captureException error is due to sentry js missing, i just copied the smallest code to show the error. This is indeed not related and can be ignored.

ryaa commented 2 years ago

The fix will be included into v1.0.3