Where to put migration startup code in Meteor 1.3+
See original GitHub issueI’m trying to upgrade my app to 1.3.2.4 and move all my server code into my /imports
folder, but I’m running into trouble with this package. When I include Migrations.migrateTo('latest');
inside of /imports/server/startup
, I get the error “Cannot call method ‘findOne’ of undefined”.
I’ve tried with and without import { Migrations } from 'meteor/percolate:migrations';
at the top of the file. It doesn’t look like Migrations is an exported variable in the package, so I would assume this would remain available as a global. Perhaps this folder loads before the package Global is available?
Confused 😕
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Migrating to Meteor 1.3
Remove code related to the Package API from the package.js files and rename them to index.js ,; Move your local packages to the...
Read more >node.js - Meteor / NodeJS run own code before migration start ...
is there a possibility to execute own code inside a Meteor / Node application before the migrations run? I know about Meteor.startup but...
Read more >percolatestudio/meteor-migrations - GitHub
As in 'Basics', you can migrate to the latest by running: Meteor. startup(function() { Migrations. migrateTo('latest'); });
Read more >Migrating to Apollo Server 4 - Apollo GraphQL Docs
Apollo Server 3 is distributed as a fixed set of packages for integrating with ... You can pass your context initialization function directly...
Read more >Example of Meteor interacting with photon using particle-api-js
Are you using 1.3?, try by creating a new project in 1.3 and put the code in a js file under the server...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you. I will check it on few versions and upload fix asap.
I think you’re right, I’ll fix that.