TypeError: (0 , _utils.delay) is not a function
See original GitHub issueI followed the tutorial to add asynchronous calls. However, I got this error in browser console,
at rootSaga
at takeEvery
at incrementAsync
TypeError: (0 , _utils.delay) is not a function
at incrementAsync$ (http://9.181.95.220:9966/build.js:31683:35)
at tryCatch (http://9.181.95.220:9966/build.js:221:40)
at Generator.invoke [as _invoke] (http://9.181.95.220:9966/build.js:459:22)
at Generator.prototype.(anonymous function) [as next] (http://9.181.95.220:9966/build.js:273:21)
at next (http://9.181.95.220:9966/build.js:29398:27)
at proc (http://9.181.95.220:9966/build.js:29350:3)
at runForkEffect (http://9.181.95.220:9966/build.js:29696:19)
at runEffect (http://9.181.95.220:9966/build.js:29476:472)
at digestEffect (http://9.181.95.220:9966/build.js:29555:5)
I figured out that in sagas.js
, it should be import { delay } from 'redux-saga'
, instead of import { delay } from 'redux-saga/utils'
. But from https://github.com/redux-saga/redux-saga/pull/1401, delay
is either in redux-saga/utils
or redux-saga/effects
, what is expected place to import delay
?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:6 (1 by maintainers)
Top Results From Across the Web
TypeError: (0 , _storeGenerator.storeGenerator) is not a function
This means the mapped module test-utils , is trying to import a module that is not mocked, thus the import error.
Read more >Timers | Node.js v19.3.0 Documentation
Non-integer delays are truncated to an integer. If callback is not a function, a TypeError will be thrown. This method has a custom...
Read more >uncaught typeerror: (0 , react__ ...
When trying to edit a record I get the Error "navigator.block is not a function". Steps to reproduce: 1- User the Form Component...
Read more >Firebase JavaScript SDK Release Notes - Google
Cloud Firestore. Fixed a bug that caused Uncaught TypeError: e.auth.addAuthTokenListener is not a function . See GitHub ...
Read more >ts-retry - npm
RetryUtilsOptions type is the same than RetryUtilsOptions but without until option. Delay family. createExponetialDelay Returns a delay function ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi I’m getting the same error with delay following this: https://github.com/redux-saga/redux-saga/blob/master/docs/advanced/RacingEffects.md
If I comment out the delay line it doesn’t error.
Edit: Fixed by using delay from
import { delay } from 'redux-saga'
instead - seems this is incorrect in multiple places in the docs?Using version “^1.0.1”, and having the same issue as @DominicTobias . Work by by using delay from
import { delay } from 'redux-saga'
however does not work fromimport {delay} from 'redux-saga/effects