Open richardgsands opened 8 years ago
+1
ReferenceError: Stripe is not defined at server/start.js:9:3
EDIT: Just figured out how to stop the error, stripe isnt being defined on the server, but if you put a Meteor.startup(function(){ Stripe.setPublishableKey('KEY'); }
in a client folder, it doesnt set off any errors. havent tested past this.
Stripe not defined using 1.3. +1
import {Stripe} from 'meteor/mrgalaxy:stripe' Meteor.startup(function() { Stripe.setPublishableKey("key"); });
I have the same issue on server side.
I have tried : import { StripeAPI } from 'meteor/mrgalaxy:stripe';
Same issue while following the readme. Am running Meteor 1.2.1.
Meteor.startup(function () { Stripe.setPublishableKey('pk_test_...'); });
W20160411-11:04:02.624(-4)? (STDERR) /Users/pal/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245 W20160411-11:04:02.624(-4)? (STDERR) throw(ex); W20160411-11:04:02.624(-4)? (STDERR) ^ W20160411-11:04:02.628(-4)? (STDERR) ReferenceError: Stripe is not defined W20160411-11:04:02.628(-4)? (STDERR) at server/startup/boot.js:25:1 W20160411-11:26:07.853(-4)? (STDERR) at /opt/meteor/.....boot.js
Stripe is loaded by the client.
With meteor 1.3 you have just to add Stripe npm package (for server side) and import following script
for client side.
I'm having the same issue with Meteor 1.2.1 - neither Stripe nor StripeCheckout are defined on the client...
@mlecoq are you not using this package then? Do you just use the npm
package instead?
@chrise86 yes, npm package is sufficient !
I don't understand why this package is only client-side. It's not noticed anywhere, there is actually a Server chapter in the readme which doesn't tell to install any other dependencies. Couldn't you wrap the npm package (you can add npm dependencies). Please tell in the doc clearly if the package is not isomorphic and that one need to install a npm package for server-side.
Hi,
I'm getting this error in the server console on startup.
ReferenceError: Stripe is not defined
at both/startup.js:2:3
Code snippet
Meteor.startup(function() { Stripe.setPublishableKey('pk_test_etc'); // stripe test account });
Any ideas why this isn't working please? I've tried that code in both 'server' and 'both' folders in my Meteor project.
Many thanks, Richard.