All Questions
229
questions
1
vote
0
answers
453
views
Module parse failed: Unexpected token (426:12) I am unable to use Redux Toolkit with React
I am working on a template by Metronic which has the react version ^17.0.2
package.json
{
"name": "demo1",
"version": "8.0.38",
"private": true,
...
0
votes
0
answers
124
views
Use redux dispatch from public folder in React
I am working on a code that uses scripts within the public folder to instantiate certain parts of my React app. I've setup a Redux store on the src folder to maintain a state that performs a certain ...
1
vote
0
answers
1k
views
React micro-frontend with module federation and Redux
I'm currently developing a micro-frontend application using React, webpack and module federation. It consists of one container app, and two "children" / remotes. The container app consist of ...
3
votes
1
answer
592
views
React, Redux , Typescript and Sass bundled using Webpack and Vite
So I created two projects using React + Redux + SASS + Typescript with
Vite and Webpack.
I was amazed using Vite as the configuration part was pre handled as compared to Webpack. But again my project ...
0
votes
0
answers
30
views
React and Webpack Issue
I have started to build a React App and implemented 3 pages which worked fine.
After structuring the first page, my app crashed and I am not able to restart it since.
I don´t know if it has something ...
1
vote
0
answers
233
views
Uncaught Error: Automatic publicPath is not supported in this browser at content.js:1:8557
i am new in react, after i run my application for testing the redux functionality, the chrome browser gives this error.
content.js:1 Uncaught Error: Automatic publicPath is not supported in this ...
12
votes
4
answers
26k
views
Dev Server has been initialized using an options object that does not match the API schema. unknown property 'publicPath'
I am using webpack: 5.71.0
webpack-cli: 4.9.2
webpack-dev-server 4.8.1
in my webpack.config.js
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/...
2
votes
0
answers
1k
views
Webpack Uncaught Reference Error in the console of React Redux project
In my React Redux app, it just shows a white screen after running npm start. There is one error in the console-
Uncaught ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before ...
4
votes
2
answers
21k
views
webpack-cli: Invalid options object. Dev Server has been initialized using an options object
I would like to start a redux project and the package.json is provided below:
{
"name": "redux-starter",
"version": "1.0.0",
"description": &...
0
votes
1
answer
121
views
Why does webpack take 4 seconds to compile an empty react / redux project?
I am concerned it is compiling my node_modules despite me asking to exclude it. How can I look and see what it is actually doing. The output in the console looks like gibberish. Is there a way to ...
0
votes
0
answers
45
views
Image Path not resolving properly React while using resolve(path)
Need your help.
I am trying to display an image in our application and I am using require(path) as below.
const logo = require('../../public/images/logo.png');
in my img src..I am using as
<img ...
0
votes
0
answers
811
views
Cannot read properties of undefined (reading 'createContext') while not using createContext
I'm very new to react and MERN stack at general. I have this error that initially was that react was duplicated so i followed some tutorials and got to "fixed"(just to have this error).
...
1
vote
0
answers
54
views
How to pass data between react embeddable widgets using redux
I have two widgets called "search widget" and "Name Widget", and I build those widget using webpack. I want to pass data from search widget to name widget. This is not like passing ...
0
votes
0
answers
281
views
Why sometimes part of redux state in next.js app is undefined?
I've seen error in Sentry. It says: "undefined is not an object", and shows snippet like this:
const someVariable = useSelector((state) => state.someReducer.someVariable);
It is very hard ...
1
vote
0
answers
272
views
Stack trace source maps not applied for Cannot update a component while rendering a different component warning
I'm looking for some advice to help me debug a warning in one of my react-redux applications.
Problem
I'm receiving this warning below with a confusing stack trace. I believe I understand the problem/...
1
vote
0
answers
955
views
Electron, React and electron-redux - Can't resolve 'fs'
I have an electron app created with electron-forge trying to utilize electron-redux v1.5.4. I'm also using @reduxjs/toolkit
I have implented my mainRenderer and storeRenderer in the manner described ...
1
vote
1
answer
152
views
React-redux error when install webpack css-loader
Trying to use css-loader with react-redux and drop me some errors when put module in webpack.config.js (code):
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
...
6
votes
2
answers
4k
views
TypeError: Class constructor ESLintWebpackPlugin cannot be invoked without 'new'
I am building a React with Redux environment, and I keep getting this error message when I run npm start:
ERROR in ./src/index.js
Module build failed (from ./node_modules/eslint-webpack-plugin/dist/...
1
vote
1
answer
1k
views
Restrict React route for the development only
Is there a chance I can restrict the React route, to work only in the development mode, and how to achieve this?
0
votes
0
answers
43
views
SSR functionality using ExpressJS with webpack + redux + sass
I need contribution to add Server-side rendering(SSR) functionality in the existing react application which has pushed to the GitHub repository. The preference is using express.js to add SSR. This ...
-2
votes
1
answer
643
views
Can't stop Redux actions from being logged in console
All of a sudden my console is cluttered with redux actions that have been dispatched.
The place this originates from is webpack:///./src/backend/index.ts. There's an eventListener here on "...
0
votes
1
answer
2k
views
Uncaught Error: Cannot find module 'redux'
I'm new to React..
This error came from Browser Console, while i'm trying to display it and also i'm working with django rest framework following the Tutorial here. While trying to implement redux ...
0
votes
2
answers
185
views
There are 2 Reacts in one project
I am currently developing a React Web App and I suddenly started to get invalid hook call error. After a little research I found out that I have two copies of React. Even each css file has one more of ...
1
vote
1
answer
304
views
explicit render with hot module reloading?
I stumbled upon this and couldn't quite understand the rationale behind.
const render = () => {
const App = require('./app/App').default
ReactDOM.render(
<Provider store={store}>
...
1
vote
0
answers
112
views
Multiple webpack entry points for React redux project
I want to create page wise bundle for react redux project.
How can we achieve this using webpack?
For simple react application we follows following way for multi entry
module.exports = {
entry: {
...
2
votes
1
answer
6k
views
page refreshes when file is changed react
I have a react/redux app and when file changes and I hit save it refreshes the page and clears
all redux data.I know t that I can persist redux data to localstorage. What I would love to know
is that ...
1
vote
0
answers
1k
views
React Hot Reload with Redux-Saga
I'm using React Hot Reloader on my project and recently noticed a strange behavior of the redux store in pairs with Hot Reloader.
When I load the page for the first time, my page component calls an ...
0
votes
0
answers
148
views
Problem with Babel Loader for React and Redux
I am new and learning Redux for React with following an slightly outdated? tutorial.
This is the index.js file that is supposed to combine our reducers:
import { combineReducers } from 'redux';
import ...
7
votes
1
answer
3k
views
React.lazy not working in production mode
I have a react app running, and I wanted to add route based code-splitting using React.lazy to it.
Currently my code is,
import { PureComponent, cloneElement, Suspense, lazy } from 'react';
...
...
2
votes
0
answers
151
views
Bundle NPM package that connects to applications store
I've been fighting with webpack and loosing for the last day and a half and I give up, please help!
So what I'm trying to do is create an NPM package that will be used in many of our sites. We have ...