relay: TodoMVC example start failed

It seems cause by babel v5 which included by fbjs-scripts (react-native 0.26 -> fbjs-scripts 0.4 -> babel 5.x). I also wonder why babel-node is executed from babel v5 and not babel-cli v6…

Stacktrace:

> TodoMVC@0.0.1 start /Users/chentsulin/Projects/relay/examples/TodoMVC
> BABEL_ENV=server babel-node ./server.js

/Users/chentsulin/Projects/relay/examples/TodoMVC/node_modules/babel/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126
      if (!option) this.log.error("Unknown option: " + alias + "." + key, ReferenceError);
                           ^

TypeError: Cannot read property 'error' of undefined
    at OptionManager.mergeOptions (/Users/chentsulin/Projects/relay/examples/TodoMVC/node_modules/babel/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:28)
    at OptionManager.init (/Users/chentsulin/Projects/relay/examples/TodoMVC/node_modules/babel/node_modules/babel-core/lib/transformation/file/options/option-manager.js:235:12)
    at compile (/Users/chentsulin/Projects/relay/examples/TodoMVC/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:117:22)
    at normalLoader (/Users/chentsulin/Projects/relay/examples/TodoMVC/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:199:14)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

You can use NPM 2 (i.e. with Node 4) and it should work!

On Jun 14, 2016, at 8:04 AM, Chandra Mohan notifications@github.com wrote:

Any workarounds until this fix is available?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

This should start to work when https://github.com/facebook/react-native/pull/7855 makes its way into a release.