parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

TypeError: Parse.Cloud.define is not a function

Open sraveh opened this issue 10 years ago • 4 comments

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

sraveh avatar Feb 05 '16 20:02 sraveh

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.

gfosco avatar Feb 05 '16 20:02 gfosco

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 https://github.com/ParsePlatform/parse-server/issues/188

sraveh avatar Feb 05 '16 21:02 sraveh

The second error was due to misconfiguration of serverURL

sraveh avatar Feb 05 '16 22:02 sraveh

Thanks!

wladneto avatar Feb 26 '16 01:02 wladneto