当路径相对于应用程序时,Meteor会引发错误

时间:2015-06-29 06:49:32

标签: meteor

我已将文件上传到目录中,当我将路径视为绝对路径时,这适用于本地。但是当部署到meteor.com上时,它会上传但会抛出以下错误。

local:stores:[new FS.Store.FileSystem("uploads",{path:"/Users/rapolu/my_meteor_apps/csvsample/imports"})]

on meteor.com:store:[new FS.Store.FileSystem(" uploads",{path:" imports"})]

[Mon Jun 29 2015 06:20:20 GMT+0000 (UTC)] INFO HIT /images/favicons/favicon-96x96.png?v=1 86.184.125.131
[Mon Jun 29 2015 06:20:20 GMT+0000 (UTC)] INFO HIT /images/favicons/favicon-160x160.png?v=1 86.184.125.131
[Mon Jun 29 2015 06:20:20 GMT+0000 (UTC)] INFO HIT /images/favicons/favicon-192x192.png?v=1 86.184.125.131
[Mon Jun 29 2015 06:20:20 GMT+0000 (UTC)] INFO HIT /images/favicons/favicon.ico?v=1 86.184.125.131
[Mon Jun 29 2015 06:20:27 GMT+0000 (UTC)] INFO HIT /cfs/files/uploads/D8e4bnuphWoXD9P7a?chunk=0&filename=test.csv&token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D 86.184.125.131
[Mon Jun 29 2015 06:20:27 GMT+0000 (UTC)] INFO Meteor._wrapAsync has been renamed to Meteor.wrapAsync
[Mon Jun 29 2015 06:20:28 GMT+0000 (UTC)] WARNING Error: ENOENT, open '/imports/uploads-D8e4bnuphWoXD9P7a-test.csv'
[Mon Jun 29 2015 06:20:28 GMT+0000 (UTC)] WARNING events.js:72
throw er; // Unhandled 'error' event
^
[Mon Jun 29 2015 06:20:32 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Mon Jun 29 2015 06:20:32 GMT+0000 (UTC)] NOTICE Starting application on port 13989
[Mon Jun 29 2015 06:20:32 GMT+0000 (UTC)] INFO STATUS running -> starting
[Mon Jun 29 2015 06:20:33 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:20:33 GMT+0000 (UTC)] INFO HIT /cfs/files/uploads/D8e4bnuphWoXD9P7a?chunk=0&filename=test.csv&token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D 86.184.125.131
[Mon Jun 29 2015 06:20:33 GMT+0000 (UTC)] INFO HIT /cfs/files/uploads/D8e4bnuphWoXD9P7a?chunk=0&filename=test.csv&token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D 86.184.125.131
[Mon Jun 29 2015 06:20:33 GMT+0000 (UTC)] INFO HIT /cfs/files/uploads/D8e4bnuphWoXD9P7a?chunk=0&filename=test.csv&token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D 86.184.125.131
[Mon Jun 29 2015 06:20:34 GMT+0000 (UTC)] INFO HIT /cfs/files/uploads/D8e4bnuphWoXD9P7a?chunk=0&filename=test.csv&token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D 86.184.125.131
[Mon Jun 29 2015 06:20:59 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:21:00 GMT+0000 (UTC)] INFO HIT /cfs/servertime 86.184.125.131
[Mon Jun 29 2015 06:21:04 GMT+0000 (UTC)] INFO HIT /cfs/files/uploads/nHRvdZx7ReeiRsaLc?chunk=0&filename=test.csv&token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D 86.184.125.131
[Mon Jun 29 2015 06:21:04 GMT+0000 (UTC)] INFO Meteor._wrapAsync has been renamed to Meteor.wrapAsync
[Mon Jun 29 2015 06:21:05 GMT+0000 (UTC)] WARNING Error: ENOENT, open '/imports/uploads-nHRvdZx7ReeiRsaLc-test.csv'
[Mon Jun 29 2015 06:21:05 GMT+0000 (UTC)] WARNING events.js:72
throw er; // Unhandled 'error' event
^
[Mon Jun 29 2015 06:21:05 GMT+0000 (UTC)] INFO STATUS running -> starting
[Mon Jun 29 2015 06:21:05 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Mon Jun 29 2015 06:21:05 GMT+0000 (UTC)] NOTICE Starting application on port 13989
[Mon Jun 29 2015 06:21:05 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:21:12 GMT+0000 (UTC)] INFO Meteor._wrapAsync has been renamed to Meteor.wrapAsync
[Mon Jun 29 2015 06:25:09 GMT+0000 (UTC)] INFO STATUS running -> killed
[Mon Jun 29 2015 06:25:09 GMT+0000 (UTC)] INFO STATUS killed -> starting
[Mon Jun 29 2015 06:25:09 GMT+0000 (UTC)] NOTICE Starting application on port 13989
[Mon Jun 29 2015 06:25:10 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:25:15 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:25:15 GMT+0000 (UTC)] INFO HIT /favicon.ico 86.184.125.131
[Mon Jun 29 2015 06:25:36 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:25:36 GMT+0000 (UTC)] INFO HIT /favicon.ico 86.184.125.131
[Mon Jun 29 2015 06:25:45 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.4.18/lib/node_modules/fibers/future.js:245
throw(ex);
^
[Mon Jun 29 2015 06:25:45 GMT+0000 (UTC)] WARNING Error: No replica set primary available for query with ReadPreference PRIMARY
at Object.Future.wait (/meteor/dev_bundles/0.4.18/lib/node_modules/fibers/future.js:395:16)
at [object Object].MongoConnection._ensureIndex (packages/mongo/mongo_driver.js:733:1)
at [object Object].Mongo.Collection._ensureIndex (packages/mongo/collection.js:620:1)
at Accounts.urls (packages/accounts-base/accounts_server.js:1309:1)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1616:4
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1659:3
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/boot.js:222:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.4.18/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/boot.js:117:5
- - - - -
at [object Object].ReplSet.checkoutReader
(/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/repl_set/repl_set.js:613:14)
at Cursor.nextObject (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/cursor.js:748:48)
at Cursor.toArray (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/cursor.js:169:10)
at Db.indexInformation (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1629:39)
at Db.ensureIndex (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1496:8)
at Collection.ensureIndex (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/collection/index.js:68:11)
at [object Object].MongoConnection._ensureIndex (packages/mongo/mongo_driver.js:732:1)
at [object Object].Mongo.Collection._ensureIndex (packages/mongo/collection.js:620:1)
at Accounts.urls (packages/accounts-base/accounts_server.js:1309:1)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1616:4
[Mon Jun 29 2015 06:25:45 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Mon Jun 29 2015 06:25:45 GMT+0000 (UTC)] NOTICE Starting application on port 13989
[Mon Jun 29 2015 06:25:45 GMT+0000 (UTC)] INFO STATUS running -> starting
[Mon Jun 29 2015 06:25:45 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:26:05 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:26:05 GMT+0000 (UTC)] INFO HIT /favicon.ico 86.184.125.131
[Mon Jun 29 2015 06:26:16 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.4.18/lib/node_modules/fibers/future.js:245
throw(ex);
^
[Mon Jun 29 2015 06:26:16 GMT+0000 (UTC)] WARNING Error: No replica set primary available for query with ReadPreference PRIMARY
at Object.Future.wait (/meteor/dev_bundles/0.4.18/lib/node_modules/fibers/future.js:395:16)
at [object Object].MongoConnection._ensureIndex (packages/mongo/mongo_driver.js:733:1)
at [object Object].Mongo.Collection._ensureIndex (packages/mongo/collection.js:620:1)
at Accounts.urls (packages/accounts-base/accounts_server.js:1309:1)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1616:4
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1659:3
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/boot.js:222:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.4.18/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/boot.js:117:5
- - - - -
at [object Object].ReplSet.checkoutReader
(/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/repl_set/repl_set.js:613:14)
at Cursor.nextObject (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/cursor.js:748:48)
at Cursor.toArray (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/cursor.js:169:10)
at Db.indexInformation (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1629:39)
at Db.ensureIndex (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1496:8)
at Collection.ensureIndex (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/collection/index.js:68:11)
at [object Object].MongoConnection._ensureIndex (packages/mongo/mongo_driver.js:732:1)
at [object Object].Mongo.Collection._ensureIndex (packages/mongo/collection.js:620:1)
at Accounts.urls (packages/accounts-base/accounts_server.js:1309:1)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1616:4
[Mon Jun 29 2015 06:26:16 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Mon Jun 29 2015 06:26:16 GMT+0000 (UTC)] NOTICE Starting application on port 13989
[Mon Jun 29 2015 06:26:16 GMT+0000 (UTC)] INFO STATUS running -> starting
[Mon Jun 29 2015 06:26:16 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:26:39 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:26:39 GMT+0000 (UTC)] INFO HIT /favicon.ico 86.184.125.131
[Mon Jun 29 2015 06:26:47 GMT+0000 (UTC)] WARNING                         throw(ex);
[Mon Jun 29 2015 06:26:47 GMT+0000 (UTC)] WARNING /meteor/dev_bundles/0.4.18/lib/node_modules/fibers/future.js:245
[Mon Jun 29 2015 06:26:47 GMT+0000 (UTC)] WARNING      ^
[Mon Jun 29 2015 06:26:47 GMT+0000 (UTC)] WARNING Error: No replica set primary available for query with ReadPreference PRIMARY
at Object.Future.wait (/meteor/dev_bundles/0.4.18/lib/node_modules/fibers/future.js:395:16)
at [object Object].MongoConnection._ensureIndex (packages/mongo/mongo_driver.js:733:1)
at [object Object].Mongo.Collection._ensureIndex (packages/mongo/collection.js:620:1)
at Accounts.urls (packages/accounts-base/accounts_server.js:1309:1)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1616:4
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1659:3
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/boot.js:222:10
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.4.18/lib/node_modules/underscore/underscore.js:79:11)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/boot.js:117:5
- - - - -
at [object Object].ReplSet.checkoutReader
(/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/repl_set/repl_set.js:613:14)
at Cursor.nextObject (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/cursor.js:748:48)
at Cursor.toArray (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/cursor.js:169:10)
at Db.indexInformation (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1629:39)
at Db.ensureIndex (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1496:8)
at Collection.ensureIndex (/meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/collection/index.js:68:11)
at [object Object].MongoConnection._ensureIndex (packages/mongo/mongo_driver.js:732:1)
at [object Object].Mongo.Collection._ensureIndex (packages/mongo/collection.js:620:1)
at Accounts.urls (packages/accounts-base/accounts_server.js:1309:1)
at /meteor/containers/8721c660-c4fb-b76c-8a3f-22f23adf7ecd/bundle/programs/server/packages/accounts-base.js:1616:4
[Mon Jun 29 2015 06:26:47 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Mon Jun 29 2015 06:26:47 GMT+0000 (UTC)] NOTICE Starting application on port 13989
[Mon Jun 29 2015 06:26:47 GMT+0000 (UTC)] INFO STATUS running -> starting
[Mon Jun 29 2015 06:26:47 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:27:16 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:27:17 GMT+0000 (UTC)] INFO HIT /favicon.ico 86.184.125.131
[Mon Jun 29 2015 06:27:23 GMT+0000 (UTC)] INFO Meteor._wrapAsync has been renamed to Meteor.wrapAsync
[Mon Jun 29 2015 06:27:52 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:27:52 GMT+0000 (UTC)] INFO HIT /favicon.ico 86.184.125.131
[Mon Jun 29 2015 06:28:45 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:28:45 GMT+0000 (UTC)] INFO HIT /4e646c7372bb59bf0a9ce4713fd830d891c4218c.css?meteor_css_resource=true 86.184.125.131
[Mon Jun 29 2015 06:28:45 GMT+0000 (UTC)] INFO HIT /9c31f2c06b4ee8be85e16f865905db59c426b6d0.js 86.184.125.131
[Mon Jun 29 2015 06:28:47 GMT+0000 (UTC)] INFO HIT /cfs/servertime 86.184.125.131
[Mon Jun 29 2015 06:28:48 GMT+0000 (UTC)] INFO HIT /fonts/font-awesome/fontawesome-webfont.woff2?v=4.3.0 86.184.125.131
[Mon Jun 29 2015 06:29:57 GMT+0000 (UTC)] INFO STATUS killed -> sleeping
[Mon Jun 29 2015 06:29:57 GMT+0000 (UTC)] INFO STATUS running -> killed
[Mon Jun 29 2015 06:34:40 GMT+0000 (UTC)] INFO STATUS null -> starting
[Mon Jun 29 2015 06:34:40 GMT+0000 (UTC)] NOTICE Starting application on port 29524
[Mon Jun 29 2015 06:34:41 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:35:55 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:35:55 GMT+0000 (UTC)] INFO HIT /8bac033753cf7508ef86b940e3b344d52625868e.js 86.184.125.131
[Mon Jun 29 2015 06:35:56 GMT+0000 (UTC)] INFO HIT /cfs/servertime 86.184.125.131
[Mon Jun 29 2015 06:36:05 GMT+0000 (UTC)] INFO HIT /cfs/files/uploads/kRKA3dRtMhETZTyRc?chunk=0&filename=test.csv&token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D 86.184.125.131
[Mon Jun 29 2015 06:36:05 GMT+0000 (UTC)] INFO Meteor._wrapAsync has been renamed to Meteor.wrapAsync
[Mon Jun 29 2015 06:36:06 GMT+0000 (UTC)] WARNING 
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/imports/uploads-kRKA3dRtMhETZTyRc-test.csv'
[Mon Jun 29 2015 06:36:06 GMT+0000 (UTC)] INFO STATUS running -> starting
[Mon Jun 29 2015 06:36:06 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Mon Jun 29 2015 06:36:06 GMT+0000 (UTC)] NOTICE Starting application on port 29524
[Mon Jun 29 2015 06:36:06 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:36:12 GMT+0000 (UTC)] INFO Meteor._wrapAsync has been renamed to Meteor.wrapAsync
[Mon Jun 29 2015 06:40:47 GMT+0000 (UTC)] INFO HIT / 86.184.125.131
[Mon Jun 29 2015 06:40:47 GMT+0000 (UTC)] INFO HIT /cfs/servertime 86.184.125.131
[Mon Jun 29 2015 06:41:09 GMT+0000 (UTC)] INFO HIT /cfs/files/uploads/ZYTz2p9Tw9NkWHNqC?chunk=0&filename=abc.csv&token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D 86.184.125.131
[Mon Jun 29 2015 06:41:10 GMT+0000 (UTC)] WARNING events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/imports/uploads-ZYTz2p9Tw9NkWHNqC-abc.csv'
[Mon Jun 29 2015 06:41:10 GMT+0000 (UTC)] ERROR Application crashed with code: 8
[Mon Jun 29 2015 06:41:10 GMT+0000 (UTC)] NOTICE Starting application on port 29524
[Mon Jun 29 2015 06:41:10 GMT+0000 (UTC)] INFO STATUS running -> starting
[Mon Jun 29 2015 06:41:10 GMT+0000 (UTC)] INFO STATUS starting -> running
[Mon Jun 29 2015 06:41:11 GMT+0000 (UTC)] INFO Meteor._wrapAsync has been renamed to Meteor.wrapAsync

1 个答案:

答案 0 :(得分:0)

meteor.com不提供存储空间。使用gridfs。