Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

help wanted: Using javascript generator #1328

Open
JeanOsorio opened this issue Sep 5, 2017 · 0 comments
Open

help wanted: Using javascript generator #1328

JeanOsorio opened this issue Sep 5, 2017 · 0 comments

Comments

@JeanOsorio
Copy link

I trying to use js generator, but I always get:

`✖ Webpack compiler encountered errors.
./src/routes/Home/components/HomeContainer.js
Module build failed: SyntaxError: Unexpected token (190:11)

188 | }
189 |

190 | function * foo (x) {
| ^
191 | var y = 2 * (yield (x + 1));
192 | var z = yield (y / 3);
193 | return (x + y + z);

BabelLoaderError: SyntaxError: Unexpected token (190:11)

188 | }
189 |

190 | function * foo (x) {
| ^
191 | var y = 2 * (yield (x + 1));
192 | var z = yield (y / 3);
193 | return (x + y + z);

at transpile (/Users/jean/Repos/analytics/tableau-wdc/tableau-wdc/node_modules/babel-loader/lib/index.js:64:13)
at /Users/jean/Repos/analytics/tableau-wdc/tableau-wdc/node_modules/babel-loader/lib/fs-cache.js:118:18
at ReadFileContext.callback (/Users/jean/Repos/analytics/tableau-wdc/tableau-wdc/node_modules/babel-loader/lib/fs-cache.js:31:21)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:359:13)

@ ./src/routes/Home/index.js 22:0-55
@ ./src/routes/index.js
@ ./src/main.js
@ multi ./src/main webpack-hot-middleware/client.js?path=/__webpack_hmr
✖ Compiler encountered errors. Error: Webpack compiler encountered errors`

I'm trying to follow the other two question:
https://github.com/davezuko/react-redux-starter-kit/issues/588
https://github.com/davezuko/react-redux-starter-kit/issues/546

but I can't make it work.

@JeanOsorio JeanOsorio changed the title Using javascript generator help wanted: Using javascript generator Sep 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant