流星不会开始 - fiber / futures.js抛出错误"错误:SQLITE_CORRUPT:数据库磁盘映像格式错误"

时间:2015-07-12 16:15:47

标签: javascript node.js macos sqlite meteor

现在,在本地运行,OSX中Meteor CLI的每个操作都会抛出此异常:

  

/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/ node_modules /纤维/ future.js:245                             扔(前);

     

错误:SQLITE_CORRUPT:数据库磁盘映像格式错误

我很难过。

我查看了fiber / future.js代码,但它超出了我的范围。 我看到SQLite is used in catalog-remote.js,有没有办法使用SQLite CLI工具重置?或者,我应该删除并重新安装SQlite3(如果是,如何)?

这是我在尝试任何Meteor命令时在终端中获得的完整日志:

/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
                        throw(ex);
                              ^
Error: SQLITE_CORRUPT: database disk image is malformed
    at Object.Future.wait (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:395:18)
    at runOnce (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:237:21)
    at [object Object]._.extend._serialize (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:176:14)
    at [object Object]._.extend.runInTransaction (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:242:21)
    at [object Object]._.extend._columnsQuery (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:888:24)
    at [object Object]._.extend._contentQuery (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:878:21)
    at [object Object]._.extend.getReleaseVersion (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:663:23)
    at Object.release.load (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/release.js:233:41)
    at /Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/main.js:893:23
    - - - - -
    at Object.Future.wait (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:398:14)
    at [object Object]._.extend._query (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:312:22)
    at [object Object]._.extend.query (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:76:20)
    at /Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:889:18
    at runOnce (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:211:18)
    at [object Object]._.extend._serialize (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:176:14)
    at [object Object]._.extend.runInTransaction (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:242:21)
    at [object Object]._.extend._columnsQuery (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:888:24)
    at [object Object]._.extend._contentQuery (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:878:21)
    at [object Object]._.extend.getReleaseVersion (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/catalog-remote.js:663:23)
    at Object.release.load (/Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/release.js:233:41)
    at /Users/mallorym/.meteor/packages/meteor-tool/.1.1.3.1d614zp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/main.js:893:23
    - - - - -

感谢您的帮助^^

2 个答案:

答案 0 :(得分:13)

here的帮助下,我能够修复它,而不必删除我在帖子中建议的所有下载的流星包。删除元数据就足够了:

rm -rf ~/.meteor/package-metadata

准备好等待一段时间,meteor在下次启动时重新创建这些数据库。

答案 1 :(得分:0)

使用sqlite3,您可以修复数据库。

cd ~/.meteor/package-metadata/v2.0.1
sqlite3 packages.data.db .dump > backup
mv packages.data.db packages.data.db.bustedX
sqlite3 packages.data.db < backup
rm backup

从本质上讲,即使数据库报告已损坏。 SQLite工具可以将其转储,然后重新创建。

干杯!