-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meteor.users.helpers not defined #27
Comments
Hey @JimHough what's the error message you saw? |
Same problem here. I installed latest windows preview release from https://github.com/meteor/meteor/wiki/Preview-of-Meteor-on-Windows When I start the app - I get this error: W20150306-15:24:50.920(5.5)? (STDERR)
W20150306-15:24:50.922(5.5)? (STDERR) C:\Users\username\AppData\Local\.meteor\packages\meteor-tool\1.1.0-winr.12\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
W20150306-15:24:50.922(5.5)? (STDERR) throw(ex);
W20150306-15:24:50.922(5.5)? (STDERR) ^
W20150306-15:24:50.922(5.5)? (STDERR) TypeError: Object [object Object] has no method 'helpers'
W20150306-15:24:50.922(5.5)? (STDERR) at app\collections\users.js:3:14
W20150306-15:24:50.922(5.5)? (STDERR) at app\collections\users.js:10:3
W20150306-15:24:50.923(5.5)? (STDERR) at D:\code\apps\dummyapp\dummyapp\.meteor\local\build\programs\server\boot.js:222:10
W20150306-15:24:50.923(5.5)? (STDERR) at Array.forEach (native)
W20150306-15:24:50.923(5.5)? (STDERR) at Function._.each._.forEach (C:\Users\username\AppData\Local\.meteor\packages\meteor-tool\1.1.0-winr.12\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:11)
W20150306-15:24:50.923(5.5)? (STDERR) at D:\code\apps\dummyapp\dummyapp\.meteor\local\build\programs\server\boot.js:117:5
W20150306-15:24:56.408(5.5)? (STDERR)
W20150306-15:24:56.409(5.5)? (STDERR) C:\Users\username\AppData\Local\.meteor\packages\meteor-tool\1.1.0-winr.12\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
W20150306-15:24:56.409(5.5)? (STDERR) throw(ex);
W20150306-15:24:56.409(5.5)? (STDERR) ^
W20150306-15:24:56.409(5.5)? (STDERR) TypeError: Object [object Object] has no method 'helpers'
W20150306-15:24:56.409(5.5)? (STDERR) at app\collections\users.js:3:14
W20150306-15:24:56.409(5.5)? (STDERR) at app\collections\users.js:10:3
W20150306-15:24:56.409(5.5)? (STDERR) at D:\code\apps\dummyapp\dummyapp\.meteor\local\build\programs\server\boot.js:222:10
W20150306-15:24:56.410(5.5)? (STDERR) at Array.forEach (native)
W20150306-15:24:56.410(5.5)? (STDERR) at Function._.each._.forEach (C:\Users\username\AppData\Local\.meteor\packages\meteor-tool\1.1.0-winr.12\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:11)
W20150306-15:24:56.410(5.5)? (STDERR) at D:\code\apps\dummyapp\dummyapp\.meteor\local\build\programs\server\boot.js:117:5
=> Exited with code: 8
W20150306-15:25:01.627(5.5)? (STDERR)
W20150306-15:25:01.627(5.5)? (STDERR) C:\Users\username\AppData\Local\.meteor\packages\meteor-tool\1.1.0-winr.12\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
W20150306-15:25:01.628(5.5)? (STDERR) ^
W20150306-15:25:01.628(5.5)? (STDERR) TypeError: Object [object Object] has no method 'helpers'
W20150306-15:25:01.628(5.5)? (STDERR) at app\collections\users.js:3:14
W20150306-15:25:01.629(5.5)? (STDERR) at app\collections\users.js:10:3
W20150306-15:25:01.629(5.5)? (STDERR) at D:\code\apps\dummyapp\dummyapp\.meteor\local\build\programs\server\boot.js:222:10
W20150306-15:25:01.629(5.5)? (STDERR) at Array.forEach (native)
W20150306-15:25:01.629(5.5)? (STDERR) at Function._.each._.forEach (C:\Users\username\AppData\Local\.meteor\packages\meteor-tool\1.1.0-winr.12\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:11)
W20150306-15:25:01.628(5.5)? (STDERR) throw(ex);
W20150306-15:25:01.630(5.5)? (STDERR) at D:\code\apps\dummyapp\dummyapp\.meteor\local\build\programs\server\boot.js:117:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
I wrote the following code in users.js Meteor.users.helpers({ some code here }); |
Does it work okay on other collections? |
Actually, I am using the package on users collections only. Let me check. EDIT: Yes. the package is working on other collections. I think the problem is with users at the moment. |
I have the same when updating meteor. Actually had the issue for quite a time. It could have to do with the need to go from Meteor.collection to Mongo.collection but this is just an educated guess. |
I wonder if this current bug is windows specific, @JimHough are you running Meteor on windows by any chance? |
@dburles using Ubuntu 14.04. Not working on any of my three systems (all Ubuntu 14.04) |
I am also running on Ubuntu 14.04. It seems as though the helpers prototype is not applied or is deleted from the users collection. |
@dburles Will you be able to work on this in the foreseeable future? |
I made the warning go away by doing:
This was quite helpful: reactioncommerce/meteor-security#5 Can the others confirm that they are also using collection-behaviours? |
@JimHough tried this project today on Ubuntu 14.04 and couldn't reproduce your error, are you sure that the issue isn't caused by a package conflict like @levino ? |
Having problems meself with this |
@AlexFrazer any further info you may have, such as system etc would be super useful thanks! |
@dburles, I am sorry, it seemed this was a result of pub/sub. My solution was to put it in a null publication.
|
I am getting another error related to Meteor.users.helpers. |
meteor list |
@dougserfass it appears as though another package has added a transform function to the Meteor.users collection. |
as you can see from meteor list, i inherited a lot of added packages in this project |
I am getting the same error
Here is my usage, even if I comment out my implementation and leave only the News.helper I still get an error.
Here is my package list, I saw in another issue that collectionFS might not work with this package?
|
Hey @harinsa somehow your project is using a very old version of collection-helpers. |
@dburles whoops, sorry about that, did not specify the version and somehow meteor gave me that version. Change to @1.0.3 and it works now. |
Hi, i am having the same problem :( |
we can't attach helpers to Meteor.users |
@crapthings Please elaborate, give some references. Thanks. |
ypeError: Object [object Object] has no method 'helpers' |
@crapthings This is not how this works... |
FYI - this happens when you add any package which applies a
|
Hey @zeroasterisk are you applying helpers to |
Though from glancing at the source code, it's unlikely that it wouldn't conflict with collection-helpers |
Well. I'm having the same kind of error, but not exactly with the same setup. I can't use collection-helpers inside any packages. I have some local packages, one of them (app-core) declares a bunch of collections and helpers and export them for use by other local packages and the main app. I'm getting `Object [object Object] has no method 'helpers'" I tried api.use('dburles:collection-helpers') on the same package as the collections, on another package required by the app-core package and on the main app, but nothing works. The only way to make it work is putting my |
@dburles Alright! For some reason I was getting a very old version of the lib. When I specified the right version, it started to work again. Probably my fault, since I started learning Meteor just these days. Thank you very much for the help! |
I am having a similar issue using the TAPi18n-db package. Is there any workaround? Error thrown is from here: |
@in0ni Unfortunately that package isn't compatible with collection-helpers, I see you have opened an issue over there, hopefully it can be resolved |
if u have package that doesn't compatible with collection-helpers try change the order of package
mikowals:batch-insert
dburles:collection-helpers |
Hello! I'm having the same problem as this error
I have version 1.1.0 of collection-helpers Meteor runs after that alerts, and in meteor shell I can access the helpers, but it is annoying to see that warnings/errors Any way to add a property called helpers to that type? Thanks! |
Ok, I made it work. I installed the meteor typings from this url Then changed the meteor typing in typings/globals/meteor/index.d.ts search for
Then everything worked without the warning. I suppose the dburles:collection-helprs should add the typings, but I don't know how to do that |
Hi,
I'm trying to use this package to link to another document on the users collection.
Its throwing an error at the line 'Meteor.users.helpers({....});'
It does this on a freshly created meteor project version 1.0.3.2
Any ideas what it could be?
Thanks
The text was updated successfully, but these errors were encountered: