Skip to content
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

Cannot read property \'service\' of undefined #222

Closed
kozzztya opened this Issue Jun 8, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@kozzztya
Copy link

kozzztya commented Jun 8, 2016

There is my code:
https://github.com/kozzztya/share-debt/tree/36cf4897219d4ac218a9a6210ab279de53269445
After test running ./node_modules/.bin/ava test/debt-add.test.js I have an error on login:

Cannot read property \'service\' of undefined

Can you look what's wrong?

@daffl

This comment has been minimized.

Copy link
Member

daffl commented Jun 8, 2016

Usually this happens when app.setup isn't called. This is the case when the server is started through something other then app.listen.

@kozzztya

This comment has been minimized.

Copy link
Author

kozzztya commented Jun 8, 2016

I called it without any success https://github.com/kozzztya/share-debt/blob/36cf4897219d4ac218a9a6210ab279de53269445/src/index.js#L6
Also I didn't use sub app like in previous issues with the same error.

@kozzztya

This comment has been minimized.

Copy link
Author

kozzztya commented Jun 8, 2016

And I didn't see in examples of feathers-auth using app.configure(services()). Am I calling all stuff in the right order?

@kozzztya

This comment has been minimized.

Copy link
Author

kozzztya commented Jun 9, 2016

I tried to configure auth in different places. And I forget to delete auth configuring in services/auth/index.js.
Still have the same issue with app.configure(authentication()) only in app.js.

@kozzztya

This comment has been minimized.

Copy link
Author

kozzztya commented Jun 9, 2016

app.setup wasn't called in test env. thanks for help.

@kozzztya kozzztya closed this Jun 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.