AppsFlyerSDK / appsflyer-capacitor-plugin

AppsFlyer SDK plugin for Capacitor
MIT License
15 stars 25 forks source link

Rollup: Parse Error: ./node_modules/appsflyer-capacitor-plugin/src/index.ts #36

Closed undergroundcreative closed 1 year ago

undergroundcreative commented 1 year ago

Report

Plugin Version

6.9.2

On what Platform are you having the issue?

ios and android

What did you do?

npm run build

What did you expect to happen?

The app to build successfully

What happened instead?

Gives a build error:

[ ERROR ] Rollup: Parse Error: ./node_modules/appsflyer-capacitor-plugin/src/index.ts:3:12 Unexpected token (Note that you need plugins to import files that are not JavaScript)

  L3:  import type { AppsFlyerPlugin } from './definitions';
  L4:  const AppsFlyer = registerPlugin<AppsFlyerPlugin>('AppsFlyerPlugin', {

[29:12.3] build failed in 10.42 s

Please provide any other relevant information.

The issue started when we upgraded the plugin to the latest version. Previous versions of the plugin had no problem building (Capacitor 3)

Here's my package.json:

{ "name": "QuizSwipe", "private": true, "version": "1.0.18", "description": "QuizSwipe", "license": "MIT", "files": [ "dist/" ], "scripts": { "build": "stencil build", "start": "stencil build --dev --watch --serve", "test": "stencil test --spec --e2e", "test.watch": "stencil test --spec --e2e --watch", "generate": "stencil generate", "clean": "npx rimraf www" }, "devDependencies": { "@capacitor/cli": "^4.0.0", "@ionic/core": "^5.0.7", "@stencil/core": "2.10.0", "@stencil/store": "^1.3.0", "@types/node": "^18.11.2" }, "dependencies": { "@awesome-cordova-plugins/in-app-purchase-2": "^5.45.0", "@capacitor-community/admob": "4.0.0", "@capacitor-community/firebase-analytics": "^1.0.1", "@capacitor-community/native-audio": "^4.0.0-0", "@capacitor/android": "^4.0.0", "@capacitor/app": "^4.0.0", "@capacitor/app-launcher": "^4.0.0", "@capacitor/browser": "^4.0.0", "@capacitor/clipboard": "^4.0.0", "@capacitor/core": "^4.0.0", "@capacitor/device": "^4.0.0", "@capacitor/ios": "^4.0.0", "@capacitor/local-notifications": "^4.0.0", "@capacitor/network": "^4.0.0", "@capacitor/preferences": "^4.0.1", "@capacitor/push-notifications": "^4.0.0", "@capacitor/share": "^4.0.0", "@capacitor/splash-screen": "^4.0.0", "@ionic-native/core": "^5.26.0", "@ionic-native/screenshot": "^5.31.1", "@sparkfabrik/capacitor-plugin-idfa": "github:AE1NS/capacitor-plugin-idfa", "appsflyer-capacitor-plugin": "^6.9.2", "capacitor-plugin-android-post-notifications-permission": "file:submodules/capacitor-plugin-android-post-notifications-permission", "capacitor-rate-app": "^3.0.0", "com.darktalker.cordova.screenshot": "^0.1.6", "cordova-plugin-device": "^2.0.3", "cordova-plugin-purchase": "^11.0.0", "cordova-support-android-plugin": "^1.0.2", "cordova-support-google-services": "^1.4.0", "es6-promise-plugin": "^4.2.2", "jetifier": "^1.6.6", "ts-md5": "^1.2.11", "tslib": "^1.11.1", "web-social-share": "^6.4.1" }, "postinstall": "jetifier" }

To get my version of TypeScript I did:

$ npx tsc -v

Which gives:

Version 4.1.6

Ionic:

Ionic CLI : 6.19.0

Capacitor:

Capacitor CLI : 4.4.0 @capacitor/android : 4.4.0 @capacitor/core : 4.4.0 @capacitor/ios : 4.4.0

Utility:

cordova-res (update available: 0.15.4) : 0.15.3 native-run : 1.7.1

System:

NodeJS : v15.1.0 npm : 7.5.2 OS : macOS Catalina

My project's tsconfig.json:

{ "compilerOptions": { "allowSyntheticDefaultImports": true, "allowUnreachableCode": false, "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowJs": true, "lib": [ "dom", "es2017" ], "moduleResolution": "node", "module": "esnext", "target": "es2017", "noUnusedLocals": true, "noUnusedParameters": true, "jsx": "react", "jsxFactory": "h", "esModuleInterop": true, "skipLibCheck": true }, "include": [ "src" ], "exclude": [ "node_modules" ] }

github-actions[bot] commented 1 year ago

👋 Hi @undergroundcreative and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify:

vildhjarta8 commented 1 year ago

For 6.9.2 you need Capacitor 4 https://github.com/AppsFlyerSDK/appsflyer-capacitor-plugin#--breaking-changes-when-updating-to-v692

github-actions[bot] commented 1 year ago

This issue is closed due to inactivity. If the issue continue, please open a new one.