question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

uncaught at check sagaMiddleware.run(saga, ...args): saga argument must be a Generator function!

See original GitHub issue

After adding the new saga in sagas.js and adjusting the store to include the middleware following the tutorial

//sagas.js
export function* helloSaga() {
   console.log('Hello Sagas!')
}

the following error appears:

utils.js:188 uncaught at check sagaMiddleware.run(saga, ...args): saga argument must be a Generator function!

Both in latest Chrome and FF.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

41reactions
michalczaplinskicommented, Jun 10, 2016

Oh, my bad, it was a long day - the issue was caused by erroneous default import, while the saga was using the named export.

19reactions
tbsoncommented, Apr 1, 2017

@zilan830 Just using default export:

//sagas.js
export default function* helloSaga() {
   console.log('Hello Sagas!')
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

saga argument must be a Generator function! error #69 - GitHub
1 and now I am getting this weird error runSaga(options, saga, ...args): saga argument must be a Generator function! 10 | export const...
Read more >
please explain: uncaught at check runSaga, saga argument ...
The run() method should receive an array of sagas (which each saga is a generator function) that each returns ...
Read more >
runSaga(storeInterface, saga, …args): saga argument must be ...
I get the error: Error: runSaga(storeInterface, saga, …args): saga argument must be a Generator function! at. src/store/configureStore.js:12
Read more >
API Reference - Redux-Saga
Notes​. saga must be a function which returns a Generator Object. The middleware will then iterate over the Generator and execute all yielded...
Read more >
saga argument must be a Generator function! error
1 and now I am getting this weird error runSaga(options, saga, ...args): saga argument must be a Generator function! 10 | export const...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found