编辑: image.js 文件具有以下代码:
var imageStore = new FS.Store.FileSystem("images", {
path: "~/uploads"
});
Images = new FS.Collection("images", {
stores: [imageStore]
});
我尝试将应用程序部署到 kirstenszoo.adopt.meteor.com。它一直处于关闭状态,我知道该应用程序有问题(尽管在实际部署时它没有说什么)。我尝试将另一个应用程序部署到同一个 URL,效果很好。下面的日志是我使用命令“meteor log kirstenszoo.adopt.meteor.com”时得到的日志。有人可以向我解释一下这个日志在说什么吗?
[Tue Aug 19 2014 05:05:16 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 05:05:16 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 05:05:16 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 05:19:45 GMT+0000 (UTC)] NOTICE Starting application on port 30293
[Tue Aug 19 2014 05:19:45 GMT+0000 (UTC)] INFO STATUS waiting -> starting
[Tue Aug 19 2014 05:19:45 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 05:19:47 GMT+0000 (UTC)] WARNING throw(ex);
^
[Tue Aug 19 2014 05:19:47 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
[Tue Aug 19 2014 05:19:47 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 05:19:47 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 05:19:47 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 05:44:13 GMT+0000 (UTC)] INFO STATUS waiting -> starting
[Tue Aug 19 2014 05:44:13 GMT+0000 (UTC)] NOTICE Starting application on port 30293
[Tue Aug 19 2014 05:44:13 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 05:44:14 GMT+0000 (UTC)] WARNING throw(ex);
[Tue Aug 19 2014 05:44:14 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
[Tue Aug 19 2014 05:44:14 GMT+0000 (UTC)] WARNING ^
[Tue Aug 19 2014 05:44:14 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 05:44:14 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 05:44:14 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 05:55:10 GMT+0000 (UTC)] INFO STATUS waiting -> killed
[Tue Aug 19 2014 05:55:10 GMT+0000 (UTC)] INFO STATUS killed -> sleeping
[Tue Aug 19 2014 07:58:33 GMT+0000 (UTC)] INFO HIT / 218.102.217.67
[Tue Aug 19 2014 07:58:34 GMT+0000 (UTC)] INFO STATUS null -> starting
[Tue Aug 19 2014 07:58:34 GMT+0000 (UTC)] NOTICE Starting application on port 14200
[Tue Aug 19 2014 07:58:34 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 07:58:35 GMT+0000 (UTC)] WARNING throw(ex);
^
[Tue Aug 19 2014 07:58:35 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
[Tue Aug 19 2014 07:58:35 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 07:58:35 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 07:58:35 GMT+0000 (UTC)] NOTICE Starting application on port 14200
[Tue Aug 19 2014 07:58:35 GMT+0000 (UTC)] INFO STATUS running -> starting
[Tue Aug 19 2014 07:58:35 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 07:58:37 GMT+0000 (UTC)] INFO HIT / 218.102.217.67
[Tue Aug 19 2014 07:58:37 GMT+0000 (UTC)] INFO HIT /favicon.ico 218.102.217.67
[Tue Aug 19 2014 07:58:38 GMT+0000 (UTC)] INFO HIT /favicon.ico 218.102.217.67
[Tue Aug 19 2014 07:58:38 GMT+0000 (UTC)] INFO HIT /favicon.ico 218.102.217.67
[Tue Aug 19 2014 07:58:41 GMT+0000 (UTC)] WARNING throw(ex);
^
[Tue Aug 19 2014 07:58:41 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
[Tue Aug 19 2014 07:58:41 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 07:58:41 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 07:58:41 GMT+0000 (UTC)] NOTICE Starting application on port 14200
[Tue Aug 19 2014 07:58:41 GMT+0000 (UTC)] INFO STATUS running -> starting
[Tue Aug 19 2014 07:58:42 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 07:58:43 GMT+0000 (UTC)] WARNING throw(ex);
^
[Tue Aug 19 2014 07:58:43 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
[Tue Aug 19 2014 07:58:43 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 07:58:43 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 07:58:43 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 07:58:56 GMT+0000 (UTC)] NOTICE Starting application on port 14200
[Tue Aug 19 2014 07:58:56 GMT+0000 (UTC)] INFO STATUS waiting -> starting
[Tue Aug 19 2014 07:58:56 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 07:58:57 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
throw(ex);
^
[Tue Aug 19 2014 07:58:57 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 07:58:57 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 07:58:57 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 07:59:18 GMT+0000 (UTC)] INFO STATUS waiting -> starting
[Tue Aug 19 2014 07:59:18 GMT+0000 (UTC)] NOTICE Starting application on port 14200
[Tue Aug 19 2014 07:59:18 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 07:59:20 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
throw(ex);
^
[Tue Aug 19 2014 07:59:20 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 07:59:20 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 07:59:20 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 08:00:20 GMT+0000 (UTC)] NOTICE Starting application on port 14200
[Tue Aug 19 2014 08:00:20 GMT+0000 (UTC)] INFO STATUS waiting -> starting
[Tue Aug 19 2014 08:00:20 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 08:00:22 GMT+0000 (UTC)] WARNING throw(ex);
[Tue Aug 19 2014 08:00:22 GMT+0000 (UTC)] WARNING ^
[Tue Aug 19 2014 08:00:22 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
[Tue Aug 19 2014 08:00:22 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 08:00:22 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 08:00:22 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 08:02:44 GMT+0000 (UTC)] INFO STATUS waiting -> starting
[Tue Aug 19 2014 08:02:44 GMT+0000 (UTC)] NOTICE Starting application on port 14200
[Tue Aug 19 2014 08:02:44 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 08:02:45 GMT+0000 (UTC)] WARNING throw(ex);
^
[Tue Aug 19 2014 08:02:45 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
[Tue Aug 19 2014 08:02:45 GMT+0000 (UTC)] WARNING Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 08:02:45 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 08:02:45 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 08:06:55 GMT+0000 (UTC)] NOTICE Starting application on port 14200
[Tue Aug 19 2014 08:06:55 GMT+0000 (UTC)] INFO STATUS waiting -> starting
[Tue Aug 19 2014 08:06:56 GMT+0000 (UTC)] INFO STATUS starting -> running
[Tue Aug 19 2014 08:06:57 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.3.38/lib/node_modules/fibers/future.js:173
throw(ex);
^
Error: FS.Store.FileSystem unable to resolve "~" in path
at new FS.Store.FileSystem (packages/cfs-filesystem/filesystem.server.js:29)
at app/collection/images.js:1:53
at app/collection/images.js:9:3
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:161:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.38/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/a8817e39-6de4-7b34-0b31-8bdbe4e22e09/bundle/programs/server/boot.js:82:5
[Tue Aug 19 2014 08:06:57 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Tue Aug 19 2014 08:06:57 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Tue Aug 19 2014 08:07:13 GMT+0000 (UTC)] INFO HIT / 218.102.217.67
[Tue Aug 19 2014 08:07:14 GMT+0000 (UTC)] INFO HIT /favicon.ico 218.102.217.67
[Tue Aug 19 2014 08:07:14 GMT+0000 (UTC)] INFO HIT /favicon.ico 218.102.217.67
[Tue Aug 19 2014 08:07:15 GMT+0000 (UTC)] INFO HIT /favicon.ico 218.102.217.67
最佳答案
看来您正在使用 collectionfs 的本地文件系统存储。问题是部署到meteor.com 的应用程序没有访问/可用性来写入这样的路径。我遇到了完全相同的问题。我的解决方案是简单地注释掉或删除路径,为了简单起见,我还将合并您的两个声明。对于已部署的应用程序:
Images = new FS.Collection("images", {
stores: [new FS.Store.FileSystem("images")]
});
在本地运行时使用:
Images = new FS.Collection("images", {
stores: [new FS.Store.FileSystem("images", {path: "~/uploads"})]
});
关于logging - 部署在 .meteor.com 上,但它总是关闭。请向我解释一下这个错误日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25378645/