The error you are encountering indicates that there's a version conflict between redux and redux-devtools-extension. You can use @redux-devtools/extension as suggested.

Solution:

In terminal:

npm install --save @redux-devtools/extension

In code:

import { composeWithDevTools } from "@redux-devtools/extension";
Answer from Joseph on Stack Overflow
🌐
npm
npmjs.com › package › redux-devtools-extension
redux-devtools-extension - npm
import { createStore, applyMiddleware } from 'redux'; import { composeWithDevTools } from 'redux-devtools-extension'; const composeEnhancers = composeWithDevTools({ // Specify here name, actionsBlacklist, actionsCreators and other options }); const store = createStore( reducer, composeEnhancers( applyMiddleware(...middleware) // other store enhancers if any ) );
      » npm install redux-devtools-extension
    
Published   Mar 06, 2021
Version   2.13.9
Author   Mihail Diordiev
🌐
npm
npmjs.com › package › @redux-devtools › extension
@redux-devtools/extension - npm
March 8, 2026 - import { createStore, applyMiddleware } from 'redux'; import { composeWithDevTools } from '@redux-devtools/extension'; const composeEnhancers = composeWithDevTools({ // Specify here name, actionsDenylist, actionsCreators and other options }); const store = createStore( reducer, composeEnhancers( applyMiddleware(...middleware), // other store enhancers if any ), );
      » npm install @redux-devtools/extension
    
Published   Mar 08, 2026
Version   4.0.0
🌐
GitHub
github.com › zalmoxisus › redux-devtools-extension
GitHub - zalmoxisus/redux-devtools-extension: Redux DevTools extension. · GitHub
For TypeScript use redux-devtools-extension npm package, which contains all the definitions, or just use (window as any) (see Recipes for an example).
Starred by 13.5K users
Forked by 1K users
Languages   JavaScript 98.4% | Pug 1.5% | HTML 0.1%
Top answer
1 of 2
4

The error you are encountering indicates that there's a version conflict between redux and redux-devtools-extension. You can use @redux-devtools/extension as suggested.

Solution:

In terminal:

npm install --save @redux-devtools/extension

In code:

import { composeWithDevTools } from "@redux-devtools/extension";
2 of 2
0

make npm_dependency_fix.js the code is below make the file and save where the react and redux are loacted

// Import necessary modules
const { execSync } = require('child_process');
const fs = require('fs');

// Function to track and process files during npm installation
function track_and_process_files() {
    // Custom logic to track and process files during npm installation
    // This function can be customized to perform actions on specific files as needed
}

// Update vulnerable packages and install necessary dependencies
function update_packages() {
    try {
        // Update node-forge to the latest version
        execSync('npm install node-forge@latest', { stdio: 'inherit' });

        // Update other vulnerable packages as needed
        // Add similar commands for other packages

        // Install additional dependencies if required
        execSync('npm install react-scripts@latest --save-dev', { stdio: 'inherit' });
    } catch (error) {
        console.error('Error occurred while updating packages:', error);
    }
}

// Get required package version
function get_required_version(packageName) {
    try {
        const packageJson = JSON.parse(fs.readFileSync('package.json'));
        return packageJson.dependencies[packageName];
    } catch (error) {
        console.error(`Error getting ${packageName} version from package.json:`, error);
        return null;
    }
}

// Main function to execute the script
function main() {
    try {
        // Run custom logic to track and process files during npm installation
        track_and_process_files();

        // Update vulnerable packages
        update_packages();

        // Check if redux-devtools-extension version is not updated
        const requiredVersion = get_required_version('redux-devtools-extension');
        if (requiredVersion === '^3.3.0') {
            console.log('Redux DevTools Extension version is not automatically updated.');
            console.log(`Please manually update redux-devtools-extension to version ${requiredVersion} in package.json`);
        }

        console.log('Script executed successfully!');
    } catch (error) {
        console.error('An error occurred in the main script:', error);
    }
}

// Call the main function to execute the script
main();

now add the code in your package.json file and save it

"scripts": {
    "custom-script": "node npm_dependency_fix.js",
    "update-and-fix": "npm run custom-script && npm audit fix --force"
  }

Now run the command

npm run update-and-fix

it automatically updates version no in package.json and updates your all packages as well. and if not updated in.js file, it will log the correct version no for you to update it manually and you got right updates.

🌐
GitHub
github.com › reduxjs › redux-devtools
GitHub - reduxjs/redux-devtools: DevTools for Redux with hot reloading, action replay, and customizable UI · GitHub
Developer Tools to power-up Redux development workflow or any other architecture which handles the state change (see integrations). It can be used as a browser extension (for Chrome, Edge and Firefox), as a standalone app or as a React component ...
Starred by 14.4K users
Forked by 1.2K users
Languages   TypeScript 84.9% | JavaScript 14.0%
🌐
Chrome Web Store
chromewebstore.google.com › detail › redux-devtools › lmhkpmbekcpmknklioeibfkpmmfibljd
Redux DevTools - Chrome Web Store
Redux DevTools for debugging application's state changes. The extension provides power-ups for your Redux development workflow. Apart from Redux, it can be used with any other architectures which handle the state. This is an open source project.
🌐
npm
npmjs.com › search
redux-devtools-extension - npm search
Redux DevTools Extension bridge, console logger, and custom inspector API for StateLoom stores.
🌐
Redux
redux.js.org › installation
Installation | Redux
November 25, 2023 - # NPM npm install @reduxjs/toolkit # Yarn yarn add @reduxjs/toolkit
Find elsewhere
🌐
npm
npmjs.com › package › redux-devtools
redux-devtools - npm
September 7, 2020 - Please refer to the latter for browser extension. ... Redux DevTools is a development time package that provides power-ups for your Redux development workflow. Be careful to strip its code in production (see walkthrough for instructions)!
      » npm install redux-devtools
    
Published   Sep 07, 2020
Version   3.7.0
Author   Dan Abramov
🌐
Browsee
browsee.io › blog › redux-devtools-how-to-use-getting-started
Redux Devtools - How To Use, Getting Started
August 26, 2023 - In the subsequent instance, we ... the Redux-promise middleware. The code snippet and command for it are. npm install --save-dev-devtools-extension ·...
🌐
30 Days Coding
30dayscoding.com › blog › mastering-redux-devtools-extensions
Mastering Redux DevTools Extension
Redux DevTools Extension NPM is a powerful tool that allows developers to debug and inspect their Redux applications with ease.
🌐
npm
npmjs.com › package › @redux-devtools › app
@redux-devtools/app - npm
npm · Sign UpSign In · 8.0.0 • Public • Published 10 days ago · Readme · Code Beta · 8 Dependencies · 1 Dependents · 32 Versions · Web, Electron and Chrome app for monitoring remote-redux-devtools.
      » npm install @redux-devtools/app
    
Published   Mar 08, 2026
Version   8.0.0
Author   Mihail Diordiev
🌐
Medium
medium.com › @samueldinesh › setting-up-redux-devtools-a-simple-guide-3b386a6254fa
Setting Up Redux DevTools — A Simple Guide | by Dinesh Babu | Medium
February 28, 2020 - 2.Installing Dependencies for Redux DevTools We will install the Redux DevTools extension to our dev dependencies using the commands shown below. Commands : npm install — save-dev redux-devtools-extension
🌐
Rootstack
rootstack.com › en › blog › redux-devtools
What is Redux DevTools and how to use them | Rootstack
The first thing is to install the ... options can be followed to connect this new tool, but this is the favorite of Redux experts: 1. npm install --save redux-devtools-extension ·...
🌐
Cloudsmith
cloudsmith.com › navigator › npm › @redux-devtools › extension
@redux-devtools/extension (3.3.0) - npm Package Quality | Cloudsmith Navigator
$npm install @redux-devtools/extension · /Processing... ✓Done · Start your free trial · 3.3.0 · Stable version · 2years ago · Released · Loading Version Data · NPM on Cloudsmith · Learn more about NPM on Cloudsmith ·
🌐
npm
npmjs.com › package › @types › redux-devtools-extension
@types/redux-devtools-extension - npm
May 23, 2017 - Stub TypeScript definitions entry for redux-devtools-extension, which provides its own types definitions. Latest version: 2.13.2, last published: 8 years ago. Start using @types/redux-devtools-extension in your project by running `npm i @types/redux-devtools-extension`. There are 9 other projects in the npm registry using @types/redux-devtools-extension.
      » npm install @types/redux-devtools-extension
    
Published   May 23, 2017
Version   2.13.2
🌐
Npm
npm.io › package › redux-devtools-extension
Redux-devtools-extension NPM | npm.io
import { createStore, applyMiddleware } from 'redux'; import { composeWithDevTools } from 'redux-devtools-extension'; const composeEnhancers = composeWithDevTools({ // Specify here name, actionsBlacklist, actionsCreators and other options }); const store = createStore( reducer, composeEnhancers( applyMiddleware(...middleware) // other store enhancers if any ) );