Meteor Accounts:调用storedLoginToken()时出错“undefined不是函数”

时间:2015-02-18 11:30:07

标签: javascript meteor meteor-accounts

我将 Meteor-CollectionFS lib添加到我的Meteor项目中,发现由于错误Exception in delivering result of invoking '/cfs.images.filerecord/insert': TypeError: undefined is not a function,文件上传无效。

关于挖掘我可以看到undefined is not a function通过调用Accounts._storedLoginToken()

cfs_upload-http.js 中抛出

我不认为CollectionFS是问题的原因,因为我创建了一个与项目具有相同依赖关系的虚拟项目 - 当我从控制台调用Accounts._storedLoginToken()时在虚拟项目中返回登录令牌,但是,当我从我自己的项目从控制台进行相同的调用时,我收到错误TypeError: undefined is not a function

关于可能导致这种情况的任何想法?

提前致谢

尼尔。

PS Worth指出1)在虚拟和原始项目中,我在调用storedLoginToken时登录了2)帐户包和cfs集合包在虚拟和其他项目中都是相同的版本。


更新

根据要求,这里是虚拟项目(有效)和真实项目(没有)的依赖关系。请注意,我实际上并没有在虚拟项目中调用 cfs内容,因为我更关注于storedLoginText()问题(cfs问题看起来像是这个问题的症状,而不是而不是原因)。

虚拟项目

流星平台 mizzao:自举-3- 下划线 伊恩:帐户的用户界面,引导-3 账户密码 aldeed:自动窗体 aldeed:collection2 CFS:标准套餐 CFS:UI CFS:文件系统 铁:路由器 zimme:铁路由器活性

虚拟项目版本

accounts-base@1.1.3 accounts-password@1.0.6 aldeed:autoform@4.2.2 aldeed:collection2@2.3.1 aldeed:simple-schema@1.1.0 防:i18n@0.4.3 application-configuration@1.0.4 autoupdate@1.1.5 base64@1.0.2 binary-heap@1.0.2 blaze@2.0.4 blaze-tools@1.0.2 boilerplate-generator@1.0.2 callback-hook@1.0.2 CFS:access-point@0.1.43 CFS:base-package@0.0.27 CFS:collection@0.5.3 CFS:collection-filters@0.2.3 CFS:data-man@0.0.4 CFS:file@0.1.15 CFS:filesystem@0.1.1 CFS:http-methods@0.0.27 CFS:http-publish@0.0.13 CFS:power-queue@0.9.11 CFS:reactive-list@0.0.9 CFS:reactive-property@0.0.4 CFS:standard-packages@0.5.3 CFS:storage-adapter@0.1.1 CFS:tempstore@0.1.3 CFS:ui@0.1.3 CFS:upload-http@0.0.19 CFS:worker@0.1.3 check@1.0.4 coffeescript@1.0.5 ddp@1.0.14 deps@1.0.6 ejson@1.0.5 email@1.0.5 fastclick@1.0.2 follower-livedata@1.0.3 geojson-utils@1.0.2 handlebars@1.0.2 html-tools@1.0.3 htmljs@1.0.3 http@1.0.10 伊恩:accounts-ui-bootstrap-3@1.2.31 id-map@1.0.2 铁:controller@1.0.7 铁:core@1.0.7 铁:dynamic-template@1.0.7 铁:layout@1.0.7 铁:location@1.0.7 铁:middleware-stack@1.0.7 铁:router@1.0.7 铁:url@1.0.7 jquery@1.11.3 json@1.0.2 launch-screen@1.0.1 livedata@1.0.12 localstorage@1.0.2 logging@1.0.6 meteor@1.1.4 meteor-platform@1.2.1 minifiers@1.1.3 minimongo@1.0.6 mizzao:bootstrap-3@3.3.1_1 mobile-status-bar@1.0.2 momentjs:moment@2.8.4 mongo@1.0.11 mongo-livedata@1.0.7 npm-bcrypt@0.7.7 observe-sequence@1.0.4 ordered-dict@1.0.2 raix:eventemitter@0.1.1 random@1.0.2 reactive-dict@1.0.5 reactive-var@1.0.4 reload@1.1.2 retry@1.0.2 routepolicy@1.0.4 service-configuration@1.0.3 session@1.0.5 sha@1.0.2 spacebars@1.0.5 spacebars-compiler@1.0.4 srp@1.0.2 stylus@1.0.6 templating@1.0.11 tracker@1.0.5 ui@1.0.5 underscore@1.0.2 url@1.0.3 webapp@1.1.6 webapp-hashing@1.0.2 wizonesolutions:underscore-string@1.0.0 zimme:iron-router-active@1.0.1

真实项目

流星平台 mizzao:自举-3- 下划线 铁:路由器 萨沙:旋 伊恩:帐户的用户界面,引导-3 账户密码 aldeed:自动窗体 aldeed:collection2 zimme:铁路由器活性 CFS:标准套餐 CFS:文件系统 CFS:UI

真实项目版本

accounts-base@1.1.3 accounts-password@1.0.5 aldeed:autoform@4.2.2 aldeed:collection2@2.3.1 aldeed:simple-schema@1.1.0 防:i18n@0.4.3 application-configuration@1.0.4 autoupdate@1.1.4 base64@1.0.2 binary-heap@1.0.2 blaze@2.0.4 blaze-tools@1.0.2 boilerplate-generator@1.0.2 callback-hook@1.0.2 CFS:access-point@0.1.43 CFS:base-package@0.0.27 CFS:collection@0.5.3 CFS:collection-filters@0.2.3 CFS:data-man@0.0.4 CFS:file@0.1.15 CFS:filesystem@0.1.1 CFS:http-methods@0.0.27 CFS:http-publish@0.0.13 CFS:power-queue@0.9.11 CFS:reactive-list@0.0.9 CFS:reactive-property@0.0.4 CFS:standard-packages@0.5.3 CFS:storage-adapter@0.1.1 CFS:tempstore@0.1.3 CFS:ui@0.1.3 CFS:upload-http@0.0.19 CFS:worker@0.1.3 check@1.0.3 coffeescript@1.0.5 ddp@1.0.13 deps@1.0.6 ejson@1.0.5 email@1.0.5 fastclick@1.0.2 follower-livedata@1.0.3 geojson-utils@1.0.2 handlebars@1.0.2 html-tools@1.0.3 htmljs@1.0.3 http@1.0.9 伊恩:accounts-ui-bootstrap-3@1.2.21 id-map@1.0.2 铁:controller@1.0.7 铁:core@1.0.7 铁:dynamic-template@1.0.7 铁:layout@1.0.7 铁:location@1.0.7 铁:middleware-stack@1.0.7 铁:router@1.0.7 铁:url@1.0.7 jquery@1.0.2 json@1.0.2 launch-screen@1.0.1 livedata@1.0.12 localstorage@1.0.2 logging@1.0.6 meteor@1.1.4 meteor-platform@1.2.1 minifiers@1.1.3 minimongo@1.0.6 mizzao:bootstrap-3@3.3.1_1 mobile-status-bar@1.0.2 momentjs:moment@2.8.4 mongo@1.0.11 mongo-livedata@1.0.7 npm-bcrypt@0.7.7 observe-sequence@1.0.4 ordered-dict@1.0.2 raix:eventemitter@0.1.1 random@1.0.2 reactive-dict@1.0.5 reactive-var@1.0.4 reload@1.1.2 retry@1.0.2 routepolicy@1.0.3 萨沙:spin@2.0.4 service-configuration@1.0.3 session@1.0.5 sha@1.0.2 spacebars@1.0.4 spacebars-compiler@1.0.4 srp@1.0.2 stylus@1.0.6 templating@1.0.10 tracker@1.0.4 ui@1.0.5 underscore@1.0.2 url@1.0.3 webapp@1.1.5 webapp-hashing@1.0.2 wizonesolutions:underscore-string@1.0.0 zimme:iron-router-active@1.0.1

1 个答案:

答案 0 :(得分:1)

好的,我发现了问题并且解决方案就像尴尬一样简单:)

这里.....不要把你自己的收藏称为“帐户”。

是的,Accounts._storedLoginToken()出错的原因是它正在调用我的集合上的方法 - 而不是在um,accounts包中声明的方法。

如果有人重复我的错误(因为我应得的话),我会在这里留下这个答案。