score:1
I faced a similar issue too, what I was doing was I miss spelt a property in my webpack.config.js which is
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "dist/assets"),
filename: "bundle.js",
},
devServer: {
contentBase: path.resolve(__dirname, "dist"),
publicPath: "/assets", //should provide the path of the served js , img , etc...
},
};
in the above code I wrongly spet contentBase as contenBase, when I changed it back, it worked well!! You should be looking out for similar issues too
score:2
The problem is that you haven't run yarn/npm install
.
score:2
I found an easy solution to this. Change the "start" script in your package.json to the following instead:
"start": "webpack serve --config webpack.config.js --open"
where webpack.config.js is your webpack config file.
I hope it works!
score:4
For me helped to run "webpack-dev-server" after I add the script to "package.json" as "start": "webpack serve --open"
Source: stackoverflow.com
Related Query
- Module Not Found - Webpack Dev Server
- Webpack Dev Server (webpack-dev-server) Hot Module Replacement (HMR) Not Working
- React Webpack Dev Server main.js not found
- Webpack + React + TypeScript: Module not found ... in ... node_modules/react/
- webpack dev server not able to find node_modules
- JSDoc does not work in local package in a Lerna monorepo project using webpack dev server but works when released to package registry
- React not rendering on Webpack Dev server
- Error in Entry Module not found - in Webpack Config file
- Webpack not generating bundle when used with Webpack Dev Server
- webpack dev server does not show the content
- Webpack Dev Server Config - contentBase not working
- How to create React App including Web3 using create-react-app? I am getting Module not found Error. BREAKING CHANGE: webpack < 5 used
- Webpack 5 images not found when importing to a module
- Why does Hot Module Replacement stop working on webpack dev server when I setup Babel es2015 preset?
- Webpack dev server Proxy is not working - ReactJS
- Webpack Dev Server React Subfolder Not Working
- Webpack ERROR Module not found
- Webpack Dev Server Not Watching or Updating Files
- after i installed npm on my visual studio terminal to create react js app, when i node start the server its display error: module not found
- module not found - webpack ts-loader @material-ui
- Webpack Entry module not found (by tutorial)
- Webpack dev server DO reload, but page not change
- Webpack stopped working after refactoring: ERROR in Entry module not found
- Why is webpack dev server not starting up my express server?
- How to make the webpack dev server run on port 80 and on 0.0.0.0 to make it publicly accessible?
- How to tell webpack dev server to serve index.html for any route
- webpack dev server CORS issue
- How to fix this error : " Module not found :can't resolve popper.js "
- react.js application showing 404 not found in nginx server
- How to configure webpack dev server with react router dom v4?
More Query from same tag
- Having trouble rendering in REACT
- React and react-chartjs-2, Line chart not displaying data from API
- Setting external HTML in react components
- React-Table get row where button is clicked
- axios and promises, array value not available but appears in console.log
- Access latest state in useMemo
- How can I abstract passing repeated children properties while keeping types non-optional?
- Cannot import firebase into react.js project. "Module not found: Error: Package path . is not exported from package"
- Dynamically generating components in React-Bootstrap
- Why the condition for empty input is not working?
- serve react create app and Nodejs app with reverse proxy Nginx
- React.js, correct way to iterate inside DOM
- Routing in ReactJS
- react-transition-group v2 and react-router-dom v4. Why animation change the data in both: inner and outer components?
- ReactJs - Compiled with warning
- Specify variable type passing function as a prop
- Chart .js Method is not implemented
- sorting react dynamic list by value on click
- Normal GET request not working in Chrome (API)
- nested routes react router 4
- Ant Design: How to make items have equal heights
- not able to extract variables from given sample
- Fetch runs in a loop
- How to Change Button text in React using useState
- Cropped image url as prop React
- How to use react-router to navigate component with multiple pages
- page refreshes when file is changed react
- "sudo npm install -g create-react-app" command not working
- Why isn't this react component that searches github's api not rendering?
- Good way to interact between different and same levels of depth (nested) in ReactJS ('States' + Hooks)