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.

Error: Reducers may not dispatch actions

See original GitHub issue

Description

After either develop or build is run, the following error message is displayed:

SHOW ERROR MSG

gatsby develop

ERROR

UNHANDLED REJECTION Reducers may not dispatch actions.

Error: Reducers may not dispatch actions.

  • redux.js:213 dispatch [demo6_gatsby]/[redux]/lib/redux.js:213:13

  • index.js:58 [demo6_gatsby]/[gatsby]/dist/redux/index.js:58:88

  • index.js:14 Object.dispatch [demo6_gatsby]/[redux-thunk]/lib/index.js:14:16

  • index.js:47 dispatch [demo6_gatsby]/[gatsby-cli]/lib/reporter/redux/index.js:47:11

  • redux.js:481 Object.createLog [demo6_gatsby]/[redux]/lib/redux.js:481:12

  • index.js:67 Object.log [demo6_gatsby]/[gatsby-cli]/lib/reporter/index.js:67:53

  • index.js:459 Object.console.log [demo6_gatsby]/[gatsby-cli]/lib/reporter/index.js:459:37

  • config.js:20 module.exports [demo6_gatsby]/[gatsby]/dist/redux/reducers/config.js:20:19

  • redux.js:464 combination [demo6_gatsby]/[redux]/lib/redux.js:464:29

  • redux.js:218 dispatch [demo6_gatsby]/[redux]/lib/redux.js:218:22

  • index.js:58 [demo6_gatsby]/[gatsby]/dist/redux/index.js:58:88

  • index.js:14 Object.dispatch [demo6_gatsby]/[redux-thunk]/lib/index.js:14:16

  • index.js:168 module.exports [demo6_gatsby]/[gatsby]/dist/bootstrap/index.js:168:9

  • develop.js:419 async module.exports [demo6_gatsby]/[gatsby]/dist/commands/develop.js:419:7

not finished open and validate gatsby-configs - 0.161s error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Closest issue is https://github.com/reduxjs/redux-thunk/issues/122 but not sure it applies to my project

Steps to reproduce

gatsby develop

Expected result

Site should be built

Actual result

Error message is displayed

Environment

SHOW CONTENT

System: OS: Windows 10 10.0.18363 CPU: (8) x64 Intel® Core™ i7 CPU @ 3.50GHz Binaries: Node: 13.0.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.19.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD Languages: Python: 2.7.13 Browsers: Edge: 44.18362.449.0 npmPackages: gatsby: ^2.18.3 => 2.18.11 gatsby-background-image: ^0.9.7 => 0.9.11 gatsby-image: ^2.2.33 => 2.2.36 gatsby-plugin-catch-links: ^2.1.18 => 2.1.21 gatsby-plugin-facebook-pixel: ^1.0.3 => 1.0.3 gatsby-plugin-google-analytics: ^2.1.29 => 2.1.31 gatsby-plugin-manifest: ^2.2.29 => 2.2.33 gatsby-plugin-offline: ^3.0.23 => 3.0.29 gatsby-plugin-react-helmet: ^3.1.15 => 3.1.18 gatsby-plugin-remove-console: ^0.0.2 => 0.0.2 gatsby-plugin-robots-txt: ^1.5.0 => 1.5.0 gatsby-plugin-sass: ^2.1.24 => 2.1.26 gatsby-plugin-sharp: ^2.3.3 => 2.3.7 gatsby-plugin-sitemap: ^2.2.22 => 2.2.24 gatsby-source-filesystem: ^2.1.38 => 2.1.42 gatsby-transformer-sharp: ^2.3.5 => 2.3.9

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:48 (8 by maintainers)

github_iconTop GitHub Comments

55reactions
Grsmtocommented, Feb 13, 2020

Here it is, it might save you 4h of debugging:

Make sure the siteUrl in your gatsby-config.js is correct. Mine was missing the http:// and for some misterious reason I had this error output.

12reactions
mathieudutourcommented, Jul 2, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

react - "Reducers may not dispatch actions." after navigating to ...
I have faced this problem after upgrading react-redux 7.1.0, redux-form to 8.3.8 and ...
Read more >
Question: "Reducers may not dispatch actions" #2753 - GitHub
When the "Reducers may not dispatch actions" error is thrown, is this because something is likely to have gone wrong in the redux...
Read more >
Uncaught Error: Reducers may not dispatch actions - Web
When my web SDK opens. it shows me this error redux.min.js:1 Uncaught Error: Reducers may not dispatch actions. at a (redux.min.js:1) at ...
Read more >
Redux Source Part II: Dispatch - Medium
The reason for this error is to prevent calls to dispatch from a reducer (hence the error “Reducers may not dispatch actions.”).
Read more >
Reducers may not dispatch actions." in my ReactJS Redux app?
Coding example for the question How to fix "Error: Reducers may not dispatch actions." in my ReactJS Redux app?-Reactjs.
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