Open xiningli opened 1 year ago
Could someone just give me some help? I am trying to import the @capacitor-community/fcm in my NEXTJS project. And I am facing this issue.
There is no issue for me to import { PushNotifications } from '@capacitor/push-notifications';
But when I am trying to import the import { FCM } from "@capacitor-community/fcm";
I am seeing the following issue.
info - Collecting page data ./[mypath]/node_modules/@capacitor-community/fcm/dist/esm/index.js:1 import { registerPlugin } from "@capacitor/core"; ^^^^^^
SyntaxError: Cannot use import statement outside a module
facing exactly the same issue.
Same issue here. Anyone found a solution?
Same issue for me too
Hey! If you're using NextJS - you can fix it by transpiling the package in your next config file. You can find more info here: https://nextjs.org/docs/app/api-reference/next-config-js/transpilePackages
Could someone just give me some help? I am trying to import the @capacitor-community/fcm in my NEXTJS project. And I am facing this issue.
There is no issue for me to import { PushNotifications } from '@capacitor/push-notifications';
But when I am trying to import the import { FCM } from "@capacitor-community/fcm";
I am seeing the following issue.
info - Collecting page data ./[mypath]/node_modules/@capacitor-community/fcm/dist/esm/index.js:1 import { registerPlugin } from "@capacitor/core"; ^^^^^^
SyntaxError: Cannot use import statement outside a module