Skip to main content

All Questions

0 votes
0 answers
8 views

React project from Webpack to Vite

I'm moving my React project from Webpack to Vite, but I have some problems: File Extensions: My files end with .js, but Vite wants them to be .jsx. Node Version: My project uses Node 16.14.0, but Vite ...
logith vikram's user avatar
-1 votes
0 answers
18 views

Webpack : Not getting desired folder tree of build files

I am working on an application and using Webpack to serve the build files. In the Chrome developer tools -> Sources, I am not getting the folder tree as expected. Here's the actual folder structure ...
PRADHYUMN SHARMA's user avatar
0 votes
0 answers
21 views

Invalid hook call in react-redux provider

I am trying to migrate from Parcel 1.0 to Webpack 4, I am using React 16.14, Node: 18.20, Npm 10.7. Getting below error when running webpack serve Invalid hook call. Hooks can only be called inside of ...
Vivek Tiwary's user avatar
1 vote
1 answer
36 views

Webpack configuration not working for jsx file with babel lorder

When runing the react project which is configured with webpack and babel loder is giving and error saying unexpected token in jsx files.Please find bellow error snippit ERROR in ./src/index.js 10:12 ...
Tharindu Sandaruwan's user avatar
0 votes
0 answers
23 views

The webpack bundle created and stored in the project directory is different than the one used to run the application with webpack-dev-server

When I run the command npm run build (webpack), webpack builds a folder with all of the static files bundled together in bundle.js. Then, when I run the command npm run dev (webpack serve), it opens ...
Sincere Tuitt's user avatar
0 votes
1 answer
46 views

Webpack - Typescript aliases error in production mode only

I'm having a problem with a React project configured with Webpack and using Typescript. Containerized with Docker (CI/CD with gitlab) . Before we didn't use aliases on our project and builds in ...
Minos's user avatar
  • 266
1 vote
0 answers
78 views

ModuleFederation with react - not able to load multiple remotes into main

I am trying to learn microfrontend with reacts using modeuleFederation but facing an issue. I have 3 projects inside my director which are like main - running on port 8080 remote 1 (products) - ...
Naruto's user avatar
  • 109
4 votes
3 answers
2k views

Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. "_assetEmittingPreviousFiles"

I am using webpack - v5.90.3, webpack-cli - v5.1.4, webpack-dev-server - v5.0.2 In my webpack.config.dev.js: const path = require('path'); const webpack = require('webpack'); module.exports = { ...
Jason1998's user avatar
0 votes
0 answers
103 views

how to solve the 'Failed to load resource: cannot parse response' on safari

I have a web app built in React and web pack. The problem is When I make any request to api on Safari, the error 'Failed to load resource: cannot parse response' appears. It works fine on Chrome or ...
Bui Ha's user avatar
  • 1
0 votes
1 answer
28 views

How to apply resolveExtensions configuration to exposed components using Webpack

I have used resolveExtensions in webpack config as follows. const commonOpts = { isExternalEnv: true, outputPath: 'dist/production/www', resolveExtensions: ['.js', '.ts', '.json', '.jsx', '.scss'...
Deepali Jadhav's user avatar
-1 votes
1 answer
218 views

React Router V6: Cannot GET route

I'm attempting to set up some basic routing but when I attempt to navigate to my Drug link, I get a "Cannot GET {route}". I'm unsure as to why this occurs, and I'd appreciate if anyone could ...
skoleosho97's user avatar
0 votes
1 answer
308 views

"Module not found" Error When Starting a React Project | webpack-dev-server error

I've been encountering a consistent 'Module not found' error whenever I run npm start or yarn start on my local machine. This error occurs every time I create a new project on my local machine but ...
Ravinder's user avatar
0 votes
0 answers
53 views

React Router Not Working Correctly with Manual URL Entry

I have a simple React Route set up with Nested Routes using react-router-dom <Link to={"/"} replace={false}>Home</Link> <Link to={"/routeA/pageA"} replace={false}>...
TheLovelySausage's user avatar
1 vote
0 answers
49 views

Errors started to point to the bundle

For some reason, the error outputs for my React project now point to the bundle and not to my code: Based on the linked post, I added the webpack.config.js file: module.exports = { devtool: '#...
AlwaysLearning's user avatar
0 votes
0 answers
82 views

webpack.config,js: Failed to load resource: the server responded with a status of 404 (Not Found)

The problem is that I get this very error Failed to load resource: the server responded with a status of 404 (Not Found) when I use webpack-dev-server. But if I just build the project then I can run ...
Rakesh's user avatar
  • 31
0 votes
0 answers
142 views

Webpack build stuck on middle of creation of bundle

I use webpack to build and tun my app locally. I use babel, ts loader, sass loader. I have pretty big codebase. Couple days ago I found that webpack cant build my app. It stuck on bundling job on 48% ...
Mykhailo Konstantynovskyi's user avatar
0 votes
0 answers
171 views

Webpack dev server with flask html templates

I am trying to use Flask to send an html view (template) and React for the front end, but I am having issues setting up the webpack-dev-server on the front end. My confusion is, my Flask app is ...
henhen's user avatar
  • 1,153
0 votes
0 answers
30 views

how to display a image outside the project using webpack (REACT)

"I have a problem: I can't display an image that is located on a different disk than my project, and Webpack doesn't seem to like it. Moving the elements into my development project is not an ...
Karbbone's user avatar
1 vote
0 answers
1k views

How to run a react application with webpack in docker?

I am creating a react app with webpack for bundling. And I need to create image of react application using Docker. Here is the package.json. { "name": "simple-weather-app", &...
Abhiram P Jayan's user avatar
1 vote
2 answers
347 views

react-scripts start not picking up js changes

I have a react application which I bootstrapped using create-react-app. The application runs in a docker container, and has been deployed in a subdomain. Let's say the domain is http://mycompany.com , ...
Abhishek's user avatar
0 votes
1 answer
133 views

How to resolve Webpack server error in React.js

I am trying to resolve this error but I dont know what to do. I have intalled the Babel extension then started gettin this error and then I deleted that. However, I am getting error now also so maybe ...
Hasan Koser's user avatar
3 votes
2 answers
3k views

HookWebpackError: Cannot read properties of undefined (reading 'e') -- inner error -- TypeError: Cannot read properties of undefined (reading 'e')

I use npx-create-react-app years, but now i can't build with run npm run build. Today still is work. I update node and npm. Clear the cahce with: npm cache clean --force None of the projects work. ...
Milán Nikolics's user avatar
1 vote
0 answers
134 views

webpack-dev-server not showing content in localhost

webpack-dev-server not showing content in localhost. Here are some files and the output screenshots for better understanding, Please help me to find the solution. I have tried many ways to fix it but ...
Zain Zahid's user avatar
0 votes
1 answer
501 views

"Cannot find module 'webpack/hot/log.js'" error when starting React app

I'm trying to run my ReactJS app locally using the npm start command. After some time, http://localhost:3000/ opens in Chrome, but nothing appears, only a blank white screen. I checked the console and ...
Mr. Developer's user avatar
0 votes
1 answer
3k views

React Fast Refresh doesn't work with Webpack 5

When I use React Fast Refresh with Webpack 5, the whole page is refreshed instead of just the component that changed. EDIT the issue was caused by Webpack configuration, a proper configuration to fix ...
Yohanna's user avatar
  • 493
1 vote
1 answer
457 views

How to setup loader for bootstrap for webpack ? or is there any better alternative than webpack?

I am stuck in adding css-loader for my bootstrap to the webpack, help please. My file structure: style.scss // Import all of Bootstrap's CSS @import "~bootstrap/scss/bootstrap"; index.js ...
New User's user avatar
  • 113
3 votes
1 answer
1k views

Webpack not able to find public folder on Production Build

My current folder structure - app - build - public - simulation - index.html - server I have a .html file in the public > simulation folder. and I am opening this HTML file in an iFrame ...
souravlahoti's user avatar
0 votes
1 answer
262 views

Image rendering in React with webpack

I'm trying to render the images on my React app, but I get "failed to load resource..404 not found" in browser. As mentionded in App.js file, relative path is not working but importing the ...
Dt68's user avatar
  • 5
1 vote
0 answers
264 views

How to enable Hot Module Replacement (HMR) for a directory outside of src in a React app?

I have a React app that uses an external shared directory at the top level, shared-js, that is located outside of the src directory of my app. I want to enable Hot Module Replacement (HMR) for this ...
Ben Catania's user avatar
0 votes
1 answer
117 views

Why if I run the build command I don't have a server created?

There are two commands "dev": "webpack serve --hot --mode development --config ./configs/webpack.config.ts", "build": "webpack --mode production --config ./configs/...
Екатерина's user avatar
0 votes
1 answer
702 views

webpack can't find required files that doesn't exist

I'm trying to perform server side rendering and I copied course teacher code, my src folder structure is /src -> [/client -> index.jsx, /server -> server.js, /shared -> Header.jsx]. I got ...
timothyOrange's user avatar
1 vote
1 answer
6k views

webpack wait until bundle finished taking so much time to build

I got an issue every time I want to run my react app it takes more than 10 minutes bundle to finished, it stack on these command [webpack-dev-middleware] wait until bundle finished: I have tried some ...
bramasta vikana's user avatar
1 vote
0 answers
59 views

Why we use webpack in react applications

Actually, I'm just curious as to why webpack is used in react applications. Why do I still use Webpack to create a dist folder with a dist.js file if I can create a build using npm run build? Can ...
Sohaib Butt's user avatar
1 vote
1 answer
495 views

why process.env doesn't work in app.js file but works in webpack.config.js?

why process.env doesn't work in app.js file but works in webpack.config.js? I have my own webpack that I created myself. It was not created with CRA the version so it is correct to deduce? Or is there ...
Виктория's user avatar
0 votes
2 answers
1k views

Module parse failed: Unexpected character '@'

I am creating a react app without using npx create-react-app, i am using webpack, and trying to use the tailwind CSS, with it. But getting error. How should I do confugration the to the react app so ...
Ravi Shankar's user avatar
2 votes
0 answers
210 views

Webpack Dev Server - hot reload on another local server

We have a React app that's embedded and served in .NET CMS project. App is bootstrapped with Create React App and webpack config tweaked with craco. Webpack dev server is running at default location ...
kelsay's user avatar
  • 31
0 votes
1 answer
3k views

You need to install 'webpack-dev-server' for running 'webpack serve'. - error getting when give npm start in React Application

[webpack-cli] You need to install 'webpack-dev-server' for running 'webpack serve'. Error: Cannot find module 'ajv/dist/compile/codegen' I getting error like this when give npm start in React ...
Yogeshraja's user avatar
0 votes
0 answers
3k views

How to fix: Access to process.binding('http_parser') is deprecated

I've seen a lot of "angular" responses to this but not any REACT only ones. PACKAGE.JSON { "name": "sdfsdf", "version": "1.0.0", "...
BostonMacOSX's user avatar
  • 1,433
0 votes
2 answers
413 views

React element type is invalid, but imports appear correct

I'm setting up a new development environment (moved from Windows 7 to Lubuntu), and now I'm trying to set up a React app on it for the first time. Well, second. create-react-app worked, but I like to ...
jtryon's user avatar
  • 1
1 vote
2 answers
2k views

Hot reloading not working on React project with Webpack 5

When I save my changes, the whole app is re-rendered and not only the changes that I have made. I have tried adding target: "web" to my devServer and also tried the following guides: https:/...
Moty D's user avatar
  • 73
1 vote
0 answers
270 views

url.format is not a function at ./node_modules/react-dev-utils/webpackHotDevClient.js

I've upgraded my React project to Webpack 5, upgraded react-dev-utils to the latest version as well Webpack Dev Server is giving me this error: main.js:3940 Uncaught TypeError: url.format is not a ...
Ivan Kohut's user avatar
5 votes
1 answer
4k views

Webpack Module Federation loads chunks from wrong URL

I am building a project with webpack module federation with the following setup: React host (running on localhost:3000) Angular Remote 1 (running on localhost:4201) Angular Remote 2 (running on ...
BarniPro's user avatar
  • 163
3 votes
0 answers
3k views

Webpack Dev Server: Error occurred while proxying request [ECONNRESET]

I have a React app that uses webpack dev server for localhost. There's a proxy NodeJS server to which Webpack redirects all UI requests. When I run webpack dev server and open the app in Chrome, the ...
darKnight's user avatar
  • 6,199
1 vote
2 answers
2k views

Can't get webpack-dev-server running

I am having some trouble getting my react app to run. I have tried multiple things, downgrading webpack version, doing npm i -g webpack-dev-server and even npm i -g webpack-cli and nothing is working. ...
quefro's user avatar
  • 101
0 votes
0 answers
40 views

How can I get rid of [webpack-dev-server] Server started: Hot Module Replacement enabled?

I have an error says in the screenshot below and I don't know what to do. It says something in index.js on the right. If anyone know, please guide me through. Any help is appreciated. Thanks!
user avatar
1 vote
1 answer
62 views

How to add inline src to image ( Webpack 5 )

I tried to add a string representation of [src] to an image, but it doesn't work. import React from "react"; import cn from "classnames"; import "./index.scss"; export ...
Viktor's user avatar
  • 33
-1 votes
1 answer
2k views

how to solve Module not found: Error: Can't resolve 'ts-loader'?

ERROR in index Module not found: Error: Can't resolve 'ts-loader' in '/home/asd123456/ic-projects/token' resolve 'ts-loader' in '/home/asd123456/ic-projects/token' Parsed request is a module using ...
JasonLim's user avatar
0 votes
1 answer
35 views

Cannot GET / in simple React example

I am doing some React book examples. I get following error with below config after running npm run start: Cannot GET / package.json { "name": "typescript", "version":...
gipcu's user avatar
  • 321
0 votes
1 answer
29 views

How to make the variable calcuate immediately while running npm run build

I defined a variable in index.js file. const isDev = process.env.NODE_ENV === 'development' const routes = [ { path: '/', redirect: isDev ? '/site-map' : '/single-order', }, isDev &&...
cookie's user avatar
  • 79
2 votes
0 answers
373 views

React Webpack Config error - You may need an appropriate loader to handle this file type

I was trying to learn about webpack I follow the instructions on the documentation but it gives me an error of. You may need an appropriate loader to handle this file type, currently no loaders are ...
Gino's user avatar
  • 79

15 30 50 per page
1
2 3 4 5
15