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

15 30 50 per page
1
2 3 4 5
24