{"action":"created","issue":{"url":"https://api.github.com/repos/cujojs/most/issues/184","labels_url":"https://api.github.com/repos/cujojs/most/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/cujojs/most/issues/184/comments","events_url":"https://api.github.com/repos/cujojs/most/issues/184/events","html_url":"https://github.com/cujojs/most/issues/184","id":126966831,"number":184,"title":"React Native Transform error (General: Babel error)","user":{"login":"jasonkuhrt","id":284476,"avatar_url":"https://avatars.githubusercontent.com/u/284476?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonkuhrt","html_url":"https://github.com/jasonkuhrt","followers_url":"https://api.github.com/users/jasonkuhrt/followers","following_url":"https://api.github.com/users/jasonkuhrt/following{/other_user}","gists_url":"https://api.github.com/users/jasonkuhrt/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonkuhrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonkuhrt/subscriptions","organizations_url":"https://api.github.com/users/jasonkuhrt/orgs","repos_url":"https://api.github.com/users/jasonkuhrt/repos","events_url":"https://api.github.com/users/jasonkuhrt/events{/privacy}","received_events_url":"https://api.github.com/users/jasonkuhrt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-15T21:59:52Z","updated_at":"2016-01-15T22:11:05Z","closed_at":null,"body":"I tried importing `most` into my React Native project but got this build error:\r\n\r\n```\r\nbundle: Created ReactPackager\r\nuncaught error Error: TypeError: Cannot read property 'error' of null\r\n    at index.js:117:20\r\n    at tryCallOne (/Users/jasonkuhrt/projects/poc-rn-list-devices/node_modules/promise/lib/core.js:37:12)\r\n    at /Users/jasonkuhrt/projects/poc-rn-list-devices/node_modules/promise/lib/core.js:123:15\r\n    at flush (/Users/jasonkuhrt/projects/poc-rn-list-devices/node_modules/asap/raw.js:50:29)\r\n    at doNTCallback0 (node.js:408:9)\r\nTransformError: /Users/jasonkuhrt/projects/poc-rn-list-devices/node_modules/most/lib/combinator/promises.js: Cannot read property 'error' of null\r\nSee logs /var/folders/zb/lgcsp0k13qqcmzjr39xv3g3c0000gn/T/react-packager.log\r\n    at SocketClient._handleMessage (SocketClient.js:139:23)\r\n    at BunserBuf.<anonymous> (SocketClient.js:53:42)\r\n    at emitOne (events.js:77:13)\r\n    at BunserBuf.emit (events.js:169:7)\r\n    at BunserBuf.process (/Users/jasonkuhrt/projects/poc-rn-list-devices/node_modules/bser/index.js:289:10)\r\n    at /Users/jasonkuhrt/projects/poc-rn-list-devices/node_modules/bser/index.js:244:12\r\n    at doNTCallback0 (node.js:408:9)\r\n    at process._tickCallback (node.js:337:13)\r\nCommand /bin/sh failed with exit code 1\r\n```\r\n\r\nThere is a [bug in React 0.18 that prevents Babel.js errors from reaching the user](https://github.com/facebook/react-native/issues/5221) but I think know what the issue is:[`lib/combinator/promises.js` uses the upcoming keyword `await`](https://github.com/cujojs/most/blob/master/lib/combinator/promises.js#L72-L74).\r\n\r\nSeems like this would be it, e.g.:\r\n\r\n```\r\n❯ babel-node --presets es2015\r\n> const await = 'foo'\r\n'use strict'\r\n> await\r\nSyntaxError: repl: Unexpected token (1:5)\r\n> 1 | await\r\n    |      ^\r\n    at Parser.pp.raise (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/parser/location.js:22:13)\r\n    at Parser.pp.unexpected (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/parser/util.js:91:8)\r\n    at Parser.pp.parseAwait (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/parser/expression.js:1024:10)\r\n    at Parser.pp.parseExprAtom (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/parser/expression.js:411:25)\r\n    at Parser.<anonymous> (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/plugins/jsx/index.js:404:22)\r\n    at Parser.parseExprAtom (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/plugins/jsx/index.js:404:22)\r\n    at Parser.pp.parseExprSubscripts (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/parser/expression.js:265:19)\r\n    at Parser.pp.parseMaybeUnary (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/parser/expression.js:245:19)\r\n    at Parser.pp.parseExprOps (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/parser/expression.js:176:19)\r\n    at Parser.pp.parseMaybeConditional (/usr/local/lib/node_modules/babel-cli/node_modules/babylon/lib/parser/expression.js:158:19)\r\n```\r\n\r\nWould you consider changing the internal code to fix this?"},"comment":{"url":"https://api.github.com/repos/cujojs/most/issues/comments/172109033","html_url":"https://github.com/cujojs/most/issues/184#issuecomment-172109033","issue_url":"https://api.github.com/repos/cujojs/most/issues/184","id":172109033,"user":{"login":"briancavalier","id":90518,"avatar_url":"https://avatars.githubusercontent.com/u/90518?v=3","gravatar_id":"","url":"https://api.github.com/users/briancavalier","html_url":"https://github.com/briancavalier","followers_url":"https://api.github.com/users/briancavalier/followers","following_url":"https://api.github.com/users/briancavalier/following{/other_user}","gists_url":"https://api.github.com/users/briancavalier/gists{/gist_id}","starred_url":"https://api.github.com/users/briancavalier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briancavalier/subscriptions","organizations_url":"https://api.github.com/users/briancavalier/orgs","repos_url":"https://api.github.com/users/briancavalier/repos","events_url":"https://api.github.com/users/briancavalier/events{/privacy}","received_events_url":"https://api.github.com/users/briancavalier/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T22:11:05Z","updated_at":"2016-01-15T22:11:05Z","body":"Oh!  Yes definitely we should change that.  I'll do it asap.  Thanks for the info."}}