Failed to set up OneSignal Push Notification in Ionic 2

Hey Everyone,
I need some help for setting up correctly OneSignal Push Notification in Ionic 2. I follow all the instructions step by step but it still fails. (Sorry for my english guys), No user are subscribed. And i’m always getting this error when i run my project:
“Error: Uncaught (in promise): TypeError: Cannot read property ‘OneSignal’ of undefined
TypeError: Cannot read property ‘OneSignal’ of undefined
at main.js:99116
at t.invoke (polyfills.js:3)
at Object.onInvoke (main.js:35839)
at t.invoke (polyfills.js:3)
at e.run (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (main.js:35830)
at t.invokeTask (polyfills.js:3)
at e.runTask (polyfills.js:3)
at s (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (main.js:35830)
at t.invokeTask (polyfills.js:3)
at e.runTask (polyfills.js:3)
at i (polyfills.js:3)
at HTMLDocument.invoke (polyfills.js:3)
ErrorHandler.handleError @ main.js:51872”

So the code i typed in my app.component.ts is :

and in my credentials.ts file where i put my api_key :
image

That’s all!! Please, i really need help i struggle with this issue for a long time but i didn’t find any solution

You have not installed the Onesignal plugin properly.

ionic plugin rm onesignal-cordova-
ionic platform rm android/ios

ionic platform add android
ionic platform add ios
ionic plugin add onesignal-cordova-plugin
ionic plugin add cordova-plugin-whitelist (# required for android)

thank you. i did what you advised me but the same error is there

Update Ionic, Cordova
Do it step by step as per here: