Error: Reducers may not dispatch actions
See original GitHub issueDescription
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:
- Created 4 years ago
- Reactions:3
- Comments:48 (8 by maintainers)
Top GitHub Comments
Here it is, it might save you 4h of debugging:
Make sure the
siteUrl
in yourgatsby-config.js
is correct. Mine was missing thehttp://
and for some misterious reason I had this error output.The issue is tracked here: https://github.com/gatsbyjs/gatsby/issues/25478 and will be solved by https://github.com/gatsbyjs/gatsby/pull/25483