Skip to content

TypeError: Parse.Cloud.define is not a function #265

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

Closed
sraveh opened this issue Feb 5, 2016 · 4 comments
Closed

TypeError: Parse.Cloud.define is not a function #265

sraveh opened this issue Feb 5, 2016 · 4 comments
Labels
type:question Support or code-level question

Comments

@sraveh
Copy link

sraveh commented Feb 5, 2016

After I upgrade to version 2.0.7 parse-server can't start and throws TypeError: Parse.Cloud.define is not a function

Everything works correctly when I downgrade back 2.0.6

Simon

@gfosco
Copy link
Contributor

gfosco commented Feb 5, 2016

By any chance are you defining/requiring Parse at the top of your cloud code file? It should be global and it is mutated, so requiring it again can remove the Cloud definitions.

@sraveh
Copy link
Author

sraveh commented Feb 5, 2016

Yes, and removing the required statement did solve the issue, but I'm now getting ParseError { code: undefined, message: 'unauthorized' } regardless if I provide the session token or not. This happens even in cloud code that does not require any user to be authenticate.

I added the require statement to solve the issue reported by evblurbs in #188

@sraveh
Copy link
Author

sraveh commented Feb 5, 2016

The second error was due to misconfiguration of serverURL

@sraveh sraveh closed this as completed Feb 5, 2016
@wladneto
Copy link

Thanks!

@mtrezza mtrezza added type:question Support or code-level question and removed 🔧 troubleshooting labels Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

4 participants