mardi 29 septembre 2015

Uncaught TypeError ember serve Windows

I am using ember-cli 1.13.8 and I just generated some pretty simple mocks and now my app won't start with ember serve or ember server

getting this error in the console Unexpected identifier SyntaxError: Unexpected identifier at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:413:25) at Object.Module._extensions..js (module.js:448:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Array.map (native) at module.exports (C:\app\server\index.js:13:68) at Class.module.exports.Task.extend.processAppMiddlewares (C:\app\node_modules\ember-cli\lib\tasks\server\express-server.js:107:14)

my index.js file for the server looks like this

module.exports = function(app) {
  var globSync   = require('glob').sync;
  var bodyParser = require('body-parser');
  var mocks      = globSync('./mocks/**/*.js', { cwd: __dirname }).map(require);
  var proxies    = globSync('./proxies/**/*.js', { cwd: __dirname }).map(require);

  // Log proxy requests
  var morgan  = require('morgan');
  app.use(morgan('dev'));
  app.use(bodyParser.json());

  mocks.forEach(function(route) { route(app); });
  proxies.forEach(function(route) { route(app); });
};




Aucun commentaire:

Enregistrer un commentaire