开源项目的好处之一是您可以打开代码,查看它的作用,甚至修改它以帮助您了解底层。
如何修改meteor(ite)的基本代码,以便我可以插入自己的控制台日志语句来查看代码是如何工作的?我将我的应用程序作为陨石应用程序运行 ( mrt
)
我尝试过但没有成功的事情: * 编辑我的 .meteor 源代码树 * 编辑我的 .meteorite 源代码树 * 编辑 /myApp/.meteor/local/build
其他详细信息:我的具体用例(尽管答案应该比仅回答这个问题更笼统)是我收到错误“排队任务中的异常:错误:Meteor 目前不支持 ObjectID 作为 id 以外的对象”并且想要console.log id 是什么(即,如果它不是 ObjectID,那么它是什么?)
这是完整的错误:
I20130826-10:36:36.038(-6)? Exception in queued task: Error: Meteor does not currently support objects other than ObjectID as ids
I20130826-10:36:36.039(-6)? at Function.LocalCollection._idStringify (packages/minimongo/minimongo.js:845)
I20130826-10:36:36.039(-6)? at _.extend._nextObject (packages/mongo-livedata/mongo_driver.js:549)
I20130826-10:36:36.039(-6)? at _.extend.forEach (packages/mongo-livedata/mongo_driver.js:570)
I20130826-10:36:36.039(-6)? at _.extend.getRawObjects (packages/mongo-livedata/mongo_driver.js:621)
I20130826-10:36:36.039(-6)? at _.extend._pollMongo (packages/mongo-livedata/mongo_driver.js:897)
I20130826-10:36:36.040(-6)? at Object._.extend._unthrottledEnsurePollIsScheduled [as task] (packages/mongo-livedata/mongo_driver.js:841)
I20130826-10:36:36.040(-6)? at _.extend._run (packages/meteor/fiber_helpers.js:144)
I20130826-10:36:36.040(-6)? at _.extend._scheduleRun (packages/meteor/fiber_helpers.js:122)
在 myApp/ 目录中的以下文件中可以找到错误消息:
- .//.meteor/local/build/programs/client/packages/minimongo.js
- .//.meteor/local/build/programs/client/packages/minimongo.js.map
- .//.meteor/local/build/programs/ctl/packages/minimongo.js
- .//.meteor/local/build/programs/ctl/packages/minimongo.js.map
- .//.meteor/local/build/programs/server/packages/minimongo.js
- .//.meteor/local/build/programs/server/packages/minimongo.js.map
并在 ~/.meteor
- .//packages/minimongo/2c0b2ba53f/browser/packages/minimongo.js
- .//packages/minimongo/2c0b2ba53f/browser/packages/minimongo.js.map
- .//packages/minimongo/2c0b2ba53f/os/packages/minimongo.js
- .//packages/minimongo/2c0b2ba53f/os/packages/minimongo.js.map
- .//packages/minimongo/80c0a81364a8a504110b56f3e9a2cba2d4e731ee/minimongo.js