You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

从Meteor 2.2升级到2.7.3后无法启动:AccountsTemplates错误

解决Meteor 2.7.3升级后重新添加useraccounts:core无法启动的问题

升级Meteor至2.7.3版本前,先从项目中移除了useraccounts:core包,完成升级后重新添加该包,启动Meteor时出现以下报错:

=> Started proxy.                             
=> Started MongoDB.                           
W20220812-16:05:04.937(2)? (STDERR) /home/----/.meteor/packages/promise/.0.12.0.7cv555.76nvp++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/promise_server.js:218
W20220812-16:05:04.966(2)? (STDERR)       throw error;
W20220812-16:05:04.967(2)? (STDERR)       ^
W20220812-16:05:04.967(2)? (STDERR) 
W20220812-16:05:04.968(2)? (STDERR) Error: AccountsTemplates: You must add at least one account service!
W20220812-16:05:04.968(2)? (STDERR)     at AT._init (packages/useraccounts:core/lib/server.js:19:11)
W20220812-16:05:04.969(2)? (STDERR)     at packages/useraccounts:core/lib/server.js:183:21
W20220812-16:05:04.969(2)? (STDERR)     at Function.time (/home/----/Documenti/GitHub/prevenzionecantieri/.meteor/local/build/programs/server/profile.js:273:30)
W20220812-16:05:04.970(2)? (STDERR)     at /home/----/Documenti/GitHub/prevenzionecantieri/.meteor/local/build/programs/server/boot.js:415:15
W20220812-16:05:04.970(2)? (STDERR)     at /home/----/Documenti/GitHub/prevenzionecantieri/.meteor/local/build/programs/server/boot.js:465:7
W20220812-16:05:04.971(2)? (STDERR)     at Function.run (/home/----/Documenti/GitHub/prevenzionecantieri/.meteor/local/build/programs/server/profile.js:280:14)
W20220812-16:05:04.971(2)? (STDERR)     at /home/----/Documenti/GitHub/prevenzionecantieri/.meteor/local/build/programs/server/boot.js:463:13
=> Exited with code: 1

尝试执行meteor add brettle:accounts-add-service解决时,遭遇版本冲突错误:

=> Errors while adding packages:             
                                            
While selecting package versions:
error: Conflict: Constraint accounts-base@1.2.0 is not satisfied by accounts-base 2.2.4.
Constraints on package "accounts-base":
* accounts-base@~2.2.3 <- top level
* accounts-base@2.1.0 <- useraccounts:core 1.16.2
* accounts-base@2.2.0 <- service-configuration 1.3.0 <- accounts-base 2.2.4 <- accounts-ui 1.4.2
* accounts-base@2.2.0 <- accounts-ui 1.4.2
* accounts-base@2.2.2 <- accounts-ui-unstyled 1.7.0 <- accounts-ui 1.4.2
* accounts-base@1.2.0 <- brettle:accounts-add-service 0.2.0
* accounts-base@1.2.0 <- brettle:accounts-multiple 0.0.8 <- brettle:accounts-add-service 0.2.0

解决步骤

执行以下命令即可恢复Meteor正常启动:

  • meteor reset
  • meteor add fetch
  • meteor add accounts-ui
  • meteor add service-configuration
  • meteor add accounts-password
  • meteor add accounts-ui

完成后Meteor可正常启动,仅需恢复本地数据库数据即可。

内容的提问来源于stack exchange,提问作者Gencix

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.23 07:24:22