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

ReferenceError: Symbol is not defined #442

Closed
fingent opened this issue Feb 16, 2016 · 2 comments
Closed

ReferenceError: Symbol is not defined #442

fingent opened this issue Feb 16, 2016 · 2 comments
Labels
type:question Support or code-level question

Comments

@fingent
Copy link

fingent commented Feb 16, 2016

D:\MyWorks\parse-server-example\node_modules\parse-server\lib\PromiseRouter.js:5
1
throw _iteratorError;
^
ReferenceError: Symbol is not defined
at PromiseRouter.merge (D:\MyWorks\parse-server-example\node_modules\parse-s
erver\lib\PromiseRouter.js:34:40)
at new ParseServer (D:\MyWorks\parse-server-example\node_modules\parse-serve
r\lib\index.js:137:10)
at Object. (D:\MyWorks\parse-server-example\index.js:16:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

npm ERR! parse-server-example@1.0.0 start: node index.js

On npm start , i am getting this , my index.js

var port = process.env.PORT || 1337;
var api = new ParseServer({
//databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
databaseURI: databaseUri || mongoConStr,
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || appKey,
masterKey: process.env.MASTER_KEY || masterkey, //Add your master key here. Keep it secret!
fileKey: fileKey,
serverURL: 'http://localhost:' + port + '/parse'
});

These keys are initialised, actually error is on this part

PromiseRouter.prototype.merge = function (router) {
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;

try {

for (var _iterator = router.routes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  var route = _step.value;

  this.routes.push(route);
}

} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
};

Please help me .

@gfosco
Copy link
Contributor

gfosco commented Feb 16, 2016

This could be a node version issue... are you running a version >=4.3?

@fingent
Copy link
Author

fingent commented Feb 16, 2016

Yeah right i have two version of node js 0.10.28 and initially it was running with previous version 0.10.28, and now run with 4.3 it is working fine. Thanks you for the help

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

2 participants