迁移到 Meteor 1.10
如何将您的应用程序迁移到 Meteor 1.10。
Meteor 1.10 中的大多数新功能要么直接在后台应用(以向后兼容的方式),要么是可选的。有关更改的完整细分,请参阅变更日志。
话虽如此,需要注意一些重大更改以及您可能遇到的错误的迁移步骤。
意外的 mongo 退出代码 62
如果您在启动本地 MongoDB 时收到Unexpected mongo exit code 62. Restarting.
,您可以重置您的项目 (meteor reset
)(如果您不关心您的本地数据),或者您需要更新本地 MongoDB 的功能兼容版本。
1. Downgrade your app to earlier version of Meteor `meteor update --release 1.9.2`
2. Start your application
3. While your application is running open a new terminal window, navigate to the
app directory and open `mongo` shell: `meteor mongo`
4. Use: `db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })` to
check the current feature compatibility.
5. If the returned version is less than 4.0 update like this:
`db.adminCommand({ setFeatureCompatibilityVersion: "4.2" })`
6. You can now stop your app and update to Meteor 1.10.
For more information about this, check out [MongoDB documentation](https://docs.mongodb.com/manual/release-notes/4.2-upgrade-standalone/).
Cordova 升级
Cordova 已从版本 7 升级到 9。我们建议您测试利用 Cordova 插件的功能,以确保它们仍然按预期工作。
WKWebViewOnly
WKWebViewOnly 现在默认设置为 true,因此如果您依赖于 UIWebView 或使用 UIWebView API 的插件,您可能希望将其设置为 false,您可以通过在 mobile-config.js 中调用App.setPreference('WKWebViewOnly', false);
来实现。但我们不建议将其设置为 false,因为苹果公司表示他们将拒绝使用 UIWebView 的应用程序。
Windows 32 位支持已删除
由于 MongoDB 从 3.4 版本开始不再支持 32 位 Windows,因此 Meteor 1.10 也删除了对 32 位 Windows 的支持。换句话说,Meteor 1.10 支持 64 位 Mac、64 位 Windows 和 64 位 Linux。
从低于 1.9.3 的版本迁移?
如果您从低于 Meteor 1.9.3 的 Meteor 版本迁移,则可能有一些此指南中未列出的重要注意事项(该指南专门涵盖 1.9.3 到 1.10)。请查看较旧的迁移指南以获取详细信息。
- 迁移到 Meteor 1.9.3(从 1.9)
- 迁移到 Meteor 1.9(从 1.8.3)
- 迁移到 Meteor 1.8.3(从 1.8.2)
- 迁移到 Meteor 1.8.2(从 1.8)
- 迁移到 Meteor 1.8(从 1.7)
- 迁移到 Meteor 1.7(从 1.6)
- 迁移到 Meteor 1.6(从 1.5)
- 迁移到 Meteor 1.5(从 1.4)
- 迁移到 Meteor 1.4(从 1.3)
- 迁移到 Meteor 1.3(从 1.2)