Closed prokawsar closed 2 years ago
I have a similar error Unhandled Promise Rejection: SyntaxError: Importing binding name 'PickerOptions' is not found.
going from IonicHelper.ts
too. Seems it cannot get around with that imports. Maybe something changed in latest ViteJS versions. Will try to investigate.
ok, functions and interfaces and types were together in one import
import {
MenuI,
loadingController,
toastController,
alertController,
pickerController,
actionSheetController,
modalController,
popoverController,
ComponentProps,
LoadingOptions,
ToastOptions,
AlertOptions,
PickerOptions,
ActionSheetOptions,
} from '@ionic/core';
correct way is to do like this
import {
loadingController,
toastController,
alertController,
pickerController,
actionSheetController,
modalController,
popoverController,
} from '@ionic/core';
import type {
MenuI,
ComponentProps,
LoadingOptions,
ToastOptions,
AlertOptions,
PickerOptions,
ActionSheetOptions,
} from '@ionic/core';
so, now everything works as expected. Hope this will help you!
Sorry for the late response.
I remember having issues with splitting the type declaration like this when I first made the project but it all seems fine now so I have pushed a commit implementing this change.
Steps I followed: Did clone, npm i, (at this point
npm run dev:start
should work) didnpx cap add android
change server.url tolocalhost:5000
then runnpm run dev:android
Getting this error on local (no capacitor)
Error:
IonicHelper.ts:2 Uncaught (in promise) SyntaxError: The requested module '/node_modules/.vite/@ionic_core.js?v=f318b351' does not provide an export named 'ActionSheetOptions'