-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Reducers may not dispatch actions #20082
Comments
It was an issue in gatsby-config.js :S Silent warning ? |
how did you end up fixing this? |
The real error message wasn't being displayed on the console for some reason. |
I had the exact same issue. It's unrelated to redux but it's related to gatsby-config.js not being configured properly |
Thank you guys. Think I figured it out |
Here it is, it might save you 4h of debugging: Make sure the |
@Grsmto also had the same issue and adding "http://" to `siteUrl' fixed it. Feels like a Gatsby bug. |
For me it was changing |
I am suddenly getting this when updating gatsby from v2.20.36 to v2.13.16. I have absolutely no idea what could be wrong - after all: gastby-config.js has not changed. Only the gatsby version. |
post your gatsby-config |
The error is a bit different in that it refers to gatsby-plugin-offline:
So maybe I should create a new issue. Here is my gatsby-config: module.exports = {
siteMetadata: {
title: 'Vermehrung v0.41.1',
},
plugins: [
{
resolve: 'gatsby-plugin-eslint',
options: {
test: /\.js$|\.jsx$/,
exclude: /(node_modules|cache|public|docs)/,
options: {
emitWarning: true,
failOnError: false,
},
},
},
{
resolve: 'gatsby-plugin-create-client-paths',
options: { prefixes: [`/Vermehrung/*`] },
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: `${__dirname}/src/images/`,
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/docs`,
name: 'docs-pages',
},
},
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
{
resolve: 'gatsby-plugin-web-font-loader',
options: {
google: {
families: ['Roboto', 'Roboto Mono'],
},
},
},
{
resolve: 'gatsby-plugin-typography',
options: {
pathToConfigModule: './src/utils/typography.js',
},
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-styled-components',
{
resolve: 'gatsby-plugin-manifest',
options: {
scope: '/',
name: 'vermehrung.ch',
short_name: 'vermehrung',
start_url: '/',
background_color: '#2e0c58',
theme_color: '#2e0c58',
display: 'standalone',
icon: 'src/images/seedling.png',
include_favicon: true,
},
},
{
resolve: 'gatsby-transformer-remark',
options: {
gfm: true,
commonmark: false,
footnotes: true,
pedantic: false,
excerpt_separator: '<!-- end -->',
plugins: [
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 2000,
wrapperStyle: 'margin-left: 0;',
linkImagesToOriginal: false,
},
},
{
resolve: 'gatsby-remark-autolink-headers',
options: {
offsetY: '64',
},
},
{
resolve: 'gatsby-remark-emojis',
options: {
// Deactivate the plugin globally (default: true)
active: true,
// Add a custom css class
class: 'emoji-icon',
// Select the size (available size: 16, 24, 32, 64)
size: 32,
// Add custom styles
styles: {
display: 'inline',
margin: '0',
'margin-top': '-3px',
position: 'relative',
top: '3px',
width: '20px',
},
},
},
{
resolve: 'gatsby-remark-external-links',
options: {
target: '_self',
rel: 'nofollow',
},
},
{
resolve: `gatsby-remark-images-medium-zoom`, // point!
options: {
background: 'rgba(128,128,128,0.5)',
},
},
'gatsby-remark-copy-linked-files',
{
resolve: `gatsby-remark-prismjs`,
options: {
// Class prefix for <pre> tags containing syntax highlighting;
// defaults to 'language-' (e.g. <pre class="language-js">).
// If your site loads Prism into the browser at runtime,
// (e.g. for use with libraries like react-live),
// you may use this to prevent Prism from re-processing syntax.
// This is an uncommon use-case though;
// If you're unsure, it's best to use the default value.
classPrefix: 'language-',
// This is used to allow setting a language for inline code
// (i.e. single backticks) by creating a separator.
// This separator is a string and will do no white-space
// stripping.
// A suggested value for English speakers is the non-ascii
// character '›'.
inlineCodeMarker: null,
// This lets you set up language aliases. For example,
// setting this to '{ sh: "bash" }' will let you use
// the language "sh" which will highlight using the
// bash highlighter.
aliases: {},
// This toggles the display of line numbers globally alongside the code.
// To use it, add the following line in gatsby-browser.js
// right after importing the prism color scheme:
// require("prismjs/plugins/line-numbers/prism-line-numbers.css")
// Defaults to false.
// If you wish to only show line numbers on certain code blocks,
// leave false and use the {numberLines: true} syntax below
showLineNumbers: false,
// If setting this to true, the parser won't handle and highlight inline
// code used in markdown i.e. single backtick code like `this`.
noInlineHighlight: false,
// This adds a new language definition to Prism or extend an already
// existing language definition. More details on this option can be
// found under the header "Add new language definition or extend an
// existing language" below.
languageExtensions: [
{
language: 'superscript',
extend: 'javascript',
definition: {
superscript_types: /(SuperType)/,
},
insertBefore: {
function: {
superscript_keywords: /(superif|superelse)/,
},
},
},
],
// Customize the prompt used in shell output
// Values below are default
prompt: {
user: 'root',
host: 'localhost',
global: false,
},
// By default the HTML entities <>&'" are escaped.
// Add additional HTML escapes by providing a mapping
// of HTML entities and their escape value IE: { '}': '{' }
escapeEntities: {},
},
},
],
},
},
'gatsby-plugin-offline',
{
resolve: 'gatsby-plugin-react-svg',
options: {
rule: {
include: /\.inline\.svg$/,
},
},
},
],
} The weird thing is: I did not update gatsby-plugin-offline. Just gatsby itself. gatsby-plugin-offline is v3.2.15. Meanwhile this error persists when building - even after returning to gatsby v2.20.36. So it seems this project is now broken 😢 |
Seeing the same as @barbalex above #20082 (comment) |
I have been stuck on gatsby v2.20.36 for two months now, because of this issue when upgrading: #19618. That seems to be about the same time my gatsby-config changed significantly (one day apart). I wonder if there is a connection. |
When I uncomment gatsby-plugin-offline in gatsby-config.js, the error does not mention gatsby-plugin-offline any more and is similar as others have posted, I think:
|
@wardpeet @ I'm getting this error while running build, rolling back to any previous version doesn't help, issue persists: running in |
Same problem here. I have reverted to gatsby v2.20.36 but the actual issue persists |
I'm also having the same issue after upgrading ~/Git/gabrielgiordano.com master* 8s ❯ yarn build 11:07:00
yarn run v1.22.4
$ gatsby build
success open and validate gatsby-configs - 0.083s
success load plugins - 4.766s
success onPreInit - 0.047s
success delete html and css files from previous builds - 0.014s
success initialize cache - 0.007s
success copy gatsby files - 0.195s
success onPreBootstrap - 0.017s
success createSchemaCustomization - 0.007s
success source and transform nodes - 5.795s
success building schema - 0.455s
ERROR #11321 PLUGIN
"gatsby-plugin-offline" threw an error while running the createPages lifecycle:
Reducers may not dispatch actions.
Error: Reducers may not dispatch actions.
- redux.js:214 dispatch
[gabrielgiordano.com]/[redux]/lib/redux.js:214:13
- index.js:67
[gabrielgiordano.com]/[gatsby]/dist/redux/index.js:67:88
- index.js:14 Object.dispatch
[gabrielgiordano.com]/[redux-thunk]/lib/index.js:14:16
- index.js:45 dispatch
[gabrielgiordano.com]/[gatsby-cli]/lib/reporter/redux/index.js:45:9
- redux.js:483 Object.createLog
[gabrielgiordano.com]/[redux]/lib/redux.js:483:12
- reporter.js:168 Reporter.warn
[gabrielgiordano.com]/[gatsby-cli]/lib/reporter/reporter.js:168:41
- patch-console.js:22 Object.console.warn
[gabrielgiordano.com]/[gatsby-cli]/lib/reporter/patch-console.js:22:14
- utils.js:449 Object.warn
[gabrielgiordano.com]/[xstate]/lib/utils.js:449:26
- StateNode.js:1313
[gabrielgiordano.com]/[xstate]/lib/StateNode.js:1313:29
- Array.map
- StateNode.js:1311 StateNode.formatTransitions
[gabrielgiordano.com]/[xstate]/lib/StateNode.js:1311:18
- StateNode.js:321 StateNode.get [as transitions]
[gabrielgiordano.com]/[xstate]/lib/StateNode.js:321:51
- StateNode.js:296 StateNode.get [as on]
[gabrielgiordano.com]/[xstate]/lib/StateNode.js:296:36
- StateNode.js:230
[gabrielgiordano.com]/[xstate]/lib/StateNode.js:230:93
- Array.forEach
- StateNode.js:230 StateNode._init
[gabrielgiordano.com]/[xstate]/lib/StateNode.js:230:45
failed createPages - 0.058s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
Also started seing this today. Upgrading or downgrading gatsby does not appear to have any effect. Neither does gatsby cache clean or yarn cache clean.
|
Yep, I have tried upgrading/downgrading/removing some plugins/gatsby cache clean/yarn clean/completely new install, all several times. Still happens though sometimes mentions gatsby-plugin-offline, sometimes only gatsby-node.js. |
Meanwhile I can't even develop any more without this issue preventing it 😢 |
We just had the same issue. |
Works for me thanks ! ✅ ❤️ |
Might be related to: #25466 |
Also worked for me, thanks mate! |
Downgrading gatsby-cli from 2.12.55 to 2.12.54 resulted in my case in this error when running
I tried downgrading further to v2.12.52 but the error remains. Actually: this could be related to #15601. |
@wardpeet @barbalex
and just replaced gatsby packages to this versions:
and only after that run after that I have updated every gatsby plugin, and build did not break It did worked for 2 projects. |
2.23.17 is working correctly with all packages updated to latest versions and without pinning resolutions "babel-plugin-remove-graphql-queries": "2.9.9"! |
With:
dev mode works 🚀 but building errors:
|
@barbalex, I'm experiencing the same thing. I'm not using 15:40:44 success createPages - 0.001s |
The fix right now that works with the latest gatsby + you do not need to copy any other package version etc is: In your
Either using |
@brysbra yes, if I uncomment gatsby-plugin-offline I still get the error too. It simply mentions something else. |
FWIW, in debugging our builds we've found that any plugin (including our local ones) that use the Separately it looks like there was an issue for dev builds when core-js was upgraded to v3 but it looks like that was reverted in the latest gatsby releases greater than patch 15. @barbalex you should try downgrading your gatsby-cli now that you've updated to the latest gatsby version that fixes the other core-js issue. It should fix your issue and allow you to build for now. just run |
Same issue here |
Why is this issue closed? :) For me it seems to be an infinite amount of bugs, using the following versions seemingly fixes it:
However, locally I can finish build with this combination. But once it is running on the CI I receive this:
any idea why? EDIT: It is github actions on an ubuntu-latest container, running NPM. |
@hiramoto having these version fixed this:
once You update, You will get the next one |
@kondricz same error here on: |
Same Issue here, I just delete everything "cache", "node_modules", "public", "yarn.lock", make a fresh install, update my gatsby-cli to the latest version. Just doing what @alexjsdev said in a comment before |
I am using these versions and it is working perfectly. It does not give me error about maximum call stack. |
I had exactly the same issue. I did not have gastby-cli installed in my project. I just installed it and it's building correctly in local and in circle-ci. |
@kondricz It worked. Thank you for your advice! |
FYI it's fixed: #25478 (comment)
|
For some weird reasons, I kept getting that error when using npm but on switching to yarn, it disappeared. Good to hear it is fixed 🎉 |
This worked for me too. Thank you |
FYI to anyone who can't upgrade:
|
I had the same issue and did a reinstall of the dependencies and was fixed |
Description
After either
develop
orbuild
is run, the following error message is displayed:SHOW ERROR MSG
Closest issue is
https://github.com/reduxjs/redux-thunk/issues/122
but not sure it applies to my projectSteps to reproduce
gatsby develop
Expected result
Site should be built
Actual result
Error message is displayed
Environment
SHOW CONTENT
The text was updated successfully, but these errors were encountered: