{"action":"closed","issue":{"url":"https://api.github.com/repos/gaearon/redux-thunk/issues/71","repository_url":"https://api.github.com/repos/gaearon/redux-thunk","labels_url":"https://api.github.com/repos/gaearon/redux-thunk/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/redux-thunk/issues/71/comments","events_url":"https://api.github.com/repos/gaearon/redux-thunk/issues/71/events","html_url":"https://github.com/gaearon/redux-thunk/issues/71","id":155638209,"number":71,"title":"Having issues calling applyMiddleWare","user":{"login":"osayame","id":7145269,"avatar_url":"https://avatars.githubusercontent.com/u/7145269?v=3","gravatar_id":"","url":"https://api.github.com/users/osayame","html_url":"https://github.com/osayame","followers_url":"https://api.github.com/users/osayame/followers","following_url":"https://api.github.com/users/osayame/following{/other_user}","gists_url":"https://api.github.com/users/osayame/gists{/gist_id}","starred_url":"https://api.github.com/users/osayame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osayame/subscriptions","organizations_url":"https://api.github.com/users/osayame/orgs","repos_url":"https://api.github.com/users/osayame/repos","events_url":"https://api.github.com/users/osayame/events{/privacy}","received_events_url":"https://api.github.com/users/osayame/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-19T01:48:51Z","updated_at":"2016-05-19T01:54:27Z","closed_at":"2016-05-19T01:54:27Z","body":"Hi there:\r\n\r\nI am having issues when creating a store with redux-thunk as middleware.\r\n\r\nHere's the error message:\r\n\r\n> ERROR in ./web/static/js/index.js\r\nModule build failed: SyntaxError: /Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/web/static/js/index.js: Unexpected token (17:34)\r\n  15 |   combineReducers({\r\n  16 |     rootReducer,\r\n> 17 |     applyMiddleware(...ReduxThunk),\r\n     |                                   ^\r\n  18 |     routing: routerReducer\r\n  19 |   })\r\n  20 | )\r\n    at Parser.pp.raise (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/location.js:22:13)\r\n    at Parser.pp.unexpected (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/util.js:89:8)\r\n    at Parser.pp.expect (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/util.js:83:33)\r\n    at Parser.pp.parseBlock (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/statement.js:509:8)\r\n    at Parser.pp.parseFunctionBody (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:913:22)\r\n    at Parser.parseFunctionBody (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/plugins/flow.js:17:20)\r\n    at Parser.pp.parseMethod (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:882:8)\r\n    at Parser.pp.parseObjPropValue (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:799:10)\r\n    at Parser.parseObjPropValue (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/plugins/flow.js:298:13)\r\n    at Parser.pp.parseObj (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:777:10)\r\n    at Parser.pp.parseExprAtom (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:486:19)\r\n    at Parser.parseExprAtom (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/plugins/jsx/index.js:18:22)\r\n    at Parser.pp.parseExprSubscripts (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:272:19)\r\n    at Parser.pp.parseMaybeUnary (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:252:19)\r\n    at Parser.pp.parseExprOps (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:183:19)\r\n    at Parser.pp.parseMaybeConditional (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:165:19)\r\n    at Parser.pp.parseMaybeAssign (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:128:19)\r\n    at Parser.pp.parseExprListItem (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:1032:16)\r\n    at Parser.parseExprListItem (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/plugins/flow.js:215:24)\r\n    at Parser.pp.parseCallExpressionArguments (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:348:20)\r\n    at Parser.pp.parseSubscripts (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:311:31)\r\n    at Parser.pp.parseExprSubscripts (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:282:15)\r\n    at Parser.pp.parseMaybeUnary (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:252:19)\r\n    at Parser.pp.parseExprOps (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:183:19)\r\n    at Parser.pp.parseMaybeConditional (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:165:19)\r\n    at Parser.pp.parseMaybeAssign (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:128:19)\r\n    at Parser.pp.parseExprListItem (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:1032:16)\r\n    at Parser.parseExprListItem (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/plugins/flow.js:215:24)\r\n    at Parser.pp.parseCallExpressionArguments (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:348:20)\r\n    at Parser.pp.parseSubscripts (/Users/osayame/Dropbox/osayame/Work/Luma/repos/luma-command-center/node_modules/babylon/lib/parser/expression.js:311:31)\r\n @ multi main\r\n\r\nHere's the code in question:\r\n\r\n> import 'babel-core/register';\r\nimport ReactDOM from 'react-dom';\r\nimport React from 'react';\r\nimport { createStore, combineReducers, applyMiddleware } from 'redux';\r\nimport { Router, Route, browserHistory } from 'react-router';\r\nimport { Provider } from 'react-redux';\r\nvar ReduxThunk = require('redux-thunk').default\r\nimport { syncHistoryWithStore, routerReducer } from 'react-router-redux';\r\nimport rootReducer from './reducers/index';\r\nimport routes from './routes';\r\nimport \"../css/index.css\";\r\nconst store = createStore(\r\n  combineReducers({\r\n    rootReducer,\r\n    applyMiddleware(...ReduxThunk),\r\n    routing: routerReducer\r\n  })\r\n)\r\nconst history = syncHistoryWithStore(browserHistory, store)\r\nconst rootElement = document.getElementById('root');\r\nReactDOM.render(\r\n  <Provider store={store}>\r\n    <Router children={routes} history={history} />\r\n  </Provider>,\r\n  document.getElementById('root')\r\n);"}}