Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

ReferenceError: Parse is not defined #1

Closed
deden opened this issue Mar 24, 2015 · 9 comments
Closed

ReferenceError: Parse is not defined #1

deden opened this issue Mar 24, 2015 · 9 comments

Comments

@deden
Copy link

deden commented Mar 24, 2015

I got this error:

/Users/username/node_modules/parse-image/index.js:9
var p = new Parse.Promise();
^
ReferenceError: Parse is not defined
at Image.setData (/Users/username/node_modules/parse-image/index.js:9:14)

@flovilmart
Copy link
Owner

In which context are you using that module?

@deden
Copy link
Author

deden commented Mar 25, 2015

here's setup on my main js :
var Parse = require('parse').Parse;
var Image = require("parse-image");

But in my case it can be fixed temporarily by adding line var Parse = require('parse').Parse; inside ...node_modules/parse-image/index.js,
any suggestion?

@flovilmart
Copy link
Owner

Do you use parse-develop?

@deden
Copy link
Author

deden commented Mar 25, 2015

No,
Currently I'm creating a script for images batch upload to my parse app.

@flovilmart
Copy link
Owner

Ok, that module wasn't meant to be used outside parse develop.

Wanna make a pull request (and add parse as a dependency in the package)?

@flovilmart
Copy link
Owner

You could also declare a global Parse instead of a var

@deden
Copy link
Author

deden commented Mar 25, 2015

Yeah, that's a more elegant way, thanks for solution

@deden deden closed this as completed Mar 25, 2015
@flovilmart
Copy link
Owner

I'll also update the module for a standalone usage as you suggested

flovilmart added a commit that referenced this issue Mar 25, 2015
Adds support for pad function for full compatibility
@flovilmart
Copy link
Owner

I've pushed an update, fixed some bugs and errors and as well added the pad method to fully comply with Parse.Cloud module

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants