stripe-meteor
stripe-meteor copied to clipboard
TypeError when used with another package
In the Package.onUse function, I specified both
api.use('mrgalaxy:stripe');
api.imply('mrgalaxy:stripe');
And both have the following error printed to the terminal:
TypeError: Object #<Object> has no method 'require'
at Package (packages/mrgalaxy:stripe/stripe_server.js:3)
I am not sure what this is stemming from as I am testing in a freshly created app and package.
To reproduce, create a new package and a new app... link the package to the app, and then specify the api.use or imply call with this package name in the newly created package.
I notice this is not an issue when added directly to the app via the standard meteor add mrgalaxy:stripe
Hmm, that's strange, I can't seem to reproduce this error. Truthfully this new package system confused me a lot so I wouldn't be surprised if I'm doing something incorrectly. Think I could see a copy of your package.js
file?
If I include either the api.use
or api.imply
lines, it throws the error I described above.
package.js file
Package.describe({
summary: "Subsciptions with Stripe made easy for Meteor",
version: "0.0.1",
git: " \* Fill me in! *\ "
});
Package.onUse(function(api) {
api.versionsFrom('[email protected]');
// api.use('mrgalaxy:stripe');
// api.imply('mrgalaxy:stripe');
api.addFiles('woody:stripe.js');
});
Package.onTest(function(api) {
api.use('tinytest');
api.use('woody:stripe');
api.addFiles('woody:stripe-tests.js');
});
Any ideas?
@davidwoody Has this been resolved?
@tejas-manohar I could not figure out what was causing the issue, so I ended up just including the files provided by stripe in my package https://atmospherejs.com/woody/stripe-easy
Any progress here? Anyone else having this issue? This seems like something at the Meteor level but I really have no idea.