Runtime Error No provider for Stripe!

I am getting this error when I run ionic using the example in the documentation.

My error is similar to this one Runtime Error No provider for ApplicationInitStatus!

This is my error:

Error: Uncaught (in promise): Error: No provider for Stripe!
Error: No provider for Stripe!
    at injectionError (http://localhost:8100/build/main.js:1823:86)
    at noProviderError (http://localhost:8100/build/main.js:1861:12)
    at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/main.js:3363:19)
    at ReflectiveInjector_._getByKeyDefault (http://localhost:8100/build/main.js:3402:25)
    at ReflectiveInjector_._getByKey (http://localhost:8100/build/main.js:3334:25)
    at ReflectiveInjector_.get (http://localhost:8100/build/main.js:3203:21)
    at AppModuleInjector.NgModuleInjector.get (http://localhost:8100/build/main.js:4168:52)
    at resolveDep (http://localhost:8100/build/main.js:11572:45)
    at createClass (http://localhost:8100/build/main.js:11440:32)
    at createDirectiveInstance (http://localhost:8100/build/main.js:11266:37)
    at c (http://localhost:8100/build/polyfills.js:3:19752)
    at Object.reject (http://localhost:8100/build/polyfills.js:3:19174)
    at NavControllerBase._fireError (http://localhost:8100/build/main.js:43841:16)
    at NavControllerBase._failed (http://localhost:8100/build/main.js:43834:14)
    at http://localhost:8100/build/main.js:43881:59
    at t.invoke (http://localhost:8100/build/polyfills.js:3:14976)
    at Object.onInvoke (http://localhost:8100/build/main.js:4736:37)
    at t.invoke (http://localhost:8100/build/polyfills.js:3:14916)
    at r.run (http://localhost:8100/build/polyfills.js:3:10143)
    at http://localhost:8100/build/polyfills.js:3:20242
Ionic Framework: ^3.0.1
Ionic Native: ^2.9.0
Ionic App Scripts: 1.3.0
Angular Core: 4.0.0
Angular Compiler CLI: 4.0.0
Node: 9.3.0
OS Platform: macOS High Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36

The solution posted is to have BrowserModule in app.module.ts file, which I have.

This is my package.json file:

{
  "name": "com.website",
  "author": "JohnDoe",
  "homepage": "website.com",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular-redux/store": "^6.0.1",
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@ionic-native/camera": "^3.6.1",
    "@ionic-native/core": "^3.6.1",
    "@ionic-native/facebook": "^3.10.3",
    "@ionic-native/paypal": "^3.10.3",
    "@ionic-native/social-sharing": "^3.8.0",
    "@ionic-native/splash-screen": "^3.6.1",
    "@ionic-native/status-bar": "^3.6.1",
    "@ionic-native/stripe": "^3.14.0",
    "@ionic/storage": "2.0.1",
    "@ngrx/core": "^1.2.0",
    "@ngrx/store": "^2.2.3",
    "@types/stripe": "^2.0.2",
    "card.io.cordova.mobilesdk": "^2.1.0",
    "com.paypal.cordova.mobilesdk": "^3.5.0",
    "cordova-ios": "4.5.4",
    "cordova-plugin-camera": "^2.3.1",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-console": "^1.0.5",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-facebook4": "^1.8.0",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-statusbar": "^2.2.1",
    "cordova-plugin-stripe": "^1.5.3",
    "cordova-plugin-whitelist": "^1.3.1",
    "cordova-plugin-x-socialsharing": "^5.1.8",
    "cordova-sqlite-storage": "^2.0.4",
    "es6-promise-plugin": "^4.2.2",
    "intl": "^1.2.5",
    "ionic-angular": "^3.0.1",
    "ionic-native": "^2.9.0",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "redux": "^3.6.0",
    "rxjs": "^5.5.6",
    "sw-toolbox": "3.4.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.0",
    "typescript": "~2.2.1"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [
    "ios",
    {
      "platform": "ios",
      "version": "",
      "locator": "ios"
    }
  ],
  "description": "This is an app",
  "config": {
    "ionic_webpack": "./config/webpack.config.js"
  },
  "cordova": {
    "plugins": {
      "ionic-plugin-keyboard": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-console": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-camera": {
        "CAMERA_USAGE_DESCRIPTION": "To update user avatar",
        "PHOTOLIBRARY_USAGE_DESCRIPTION": " "
      },
      "cordova-plugin-x-socialsharing": {},
      "com.paypal.cordova.mobilesdk": {},
      "cordova-plugin-facebook4": {
        "APP_ID": "XXXXXX",
        "APP_NAME": "XXXXXX"
      },
      "cordova-plugin-stripe": {}
    },
    "platforms": [
      "ios"
    ]
  }
}

Here is ionic info:


cli packages: (/Users/leetcat/.nvm/versions/node/v9.3.0/lib/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 1.3.0
    Cordova Platforms  : ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.0.2
    Node              : v9.3.0
    npm               : 5.5.1 
    OS                : macOS High Sierra
    Xcode             : Xcode 9.2 Build version 9C40b 

Environment Variables:

    ANDROID_HOME : /Users/leetcat/Library/Android/sdk

Misc:

Any help would be appreciated. Thank you!

Did you do this as per documentation in the URL you gave?

1 Like

That was the solution. Thank you!

ok
plse mark as solution!
Tom

1 Like