Is "transactions" a reserved word in the folder structure?

Just curious if anyone else has run into this issue? In each methods folder, we use an index.js file to import all of the folder’s methods, so that we can reduce the import lines on the server. Has been working well so far, but ran into an odd situation:

// server.js

import '/imports/lib/methods/counts'; //works
import '/imports/lib/methods/stripe'; //works
import '/imports/lib/methods/transaction'; //works
import '/imports/lib/methods/transactions'; // fails

I literally just renamed /transactions to /transaction and the same code worked. Pulled my hair out for a bit, though. =/

1 Like

Searching the Meteor Github repo for “transactions” shows nothing unexpected. I think your issue must lie elsewhere,

Hm. I encountered this again yesterday:

import '/imports/lib/methods/email'; //works
import '/imports/lib/methods/emails'; // fails

I’m wondering now if it has something to do with duplicate folder names throughout the app, as there are only a few places we use counts or stripe for a folder name, but we use emails and transactions all over.

Will report back if I find the solution, but at least I’m pretty sure you’re right about this not being a reserved word issue.

1 Like