I have created an ionic project(version: 4.0.6). I am getting below error after adding the plugin cordova-plugin-x-socialsharing from https://beta.ionicframework.com/docs/native/social-sharing. I am stuck here. Could anybody help me on this please.
index.js:413 Uncaught TypeError: Object(...) is not a function
at index.js:413
at Object../node_modules/@ionic-native/social-sharing/index.js (index.js:590)
at __webpack_require__ (bootstrap:81)
at Object../src/app/app.module.ts (app.global.ts:10)
at __webpack_require__ (bootstrap:81)
at Object../src/main.ts (environment.ts:15)
at __webpack_require__ (bootstrap:81)
at Object.0 (main.ts:12)
at __webpack_require__ (bootstrap:81)
at checkDeferredModules (bootstrap:43)
Update: I found one solution today! step1: change version of plugin in package.json to the same version of @ionic-native/core that shown in the package.json. Step 2: remove node_module and run npm install. Step 3: add '/ngx' at the end when import it like below; import { SocialSharing } from '@ionic-native/social-sharing/ngx'; step 4: do rest same as ionic 2 or 3