React JS "npm start" shows failed to complile web-vitals - reactjs

failed to compile -/src/reportWebVitals.js Module not found: Can't resolve 'web-vitals'.
Since new to react JS, could not find what happened. Here is the reportWebVitals.JS file. Thanks in advance for the help.
"/src/reportWebVitals.js Module not found: Can't resolve 'web-vitals' in 'E:\ReactResources\RectProjects\test-app\src'"`

In your Terminal stop the server (Ctrl+C) and run the following command:
npm i web-vitals --save-dev

Manually installing web-vitals worked for me.
I used the following command
yarn add web-vitals

Related

While run the React application getting error

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 install to run React application. Please give solution to solve this issue.
I had the same issue when I used JHipster, which I solved by running this command
npm install --save-dev ajv#^7
Thanks to this answer

Module not found: Can't resolve 'apexcharts/dist/apexcharts.common' apex chart module not found

Failed to compile
./node_modules/react-apexcharts/dist/react-apexcharts.min.js
Module not found: Can't resolve 'apexcharts/dist/apexcharts.common' in
'Z:\React\misc-examples\node_modules\react-apexcharts\dist'
This error occurred during the build time and cannot be dismissed.
by this command "npm install --save react-apexcharts apexcharts"
my problem solved.
yarn add --save react-apexcharts apexcharts

React.Js styled-components getting this error

ERROR in ./src/components/Login.js 4:0-39
Module not found: Error: Cannot find file:
'styled-components.browser.esm.js' does not match the corresponding
name on disk:
'.\node_modules\styled-Components\dist\styled-components'.
This looks like an installation problem. Run/type in command line
npm install --save styled-components
and then restart your app, by running npm start
If you use yarn, replace npm with yarn.
Let us know if the issue resolves!

`yarn start` command result in `Module not found` error

I'm getting this error when run yarn start command:
Module not found: Can't resolve
'#babel/runtime/helpers/builtin/assertThisInitialized' in
'/home/new88/Desktop/javascript/the_venue/node_modules/#material-ui/core/ButtonBase'
Output in browser
Failed to compile
./node_modules/#material-ui/core/ButtonBase/TouchRipple.js
Module not found: Can't resolve
'#babel/runtime/helpers/builtin/assertThisInitialized' in
'/home/new88/Desktop/javascript/the_venue/node_modules/#material-ui/core/ButtonBase'
How can I fix this?
Quoting the comment from github -
The issue seems from the Babel runtime being split into two,
and breaking the Material UI.
I downgraded the babel runtime, with
npm install --save-exact #babel/runtime#7.0.0-beta.55
and it works now.

Webpack-hot-middleware/client module not found

So im getting this error in the terminal ERROR in multi ./client/src/index.js webpack-hot-middleware/client
Module not found
I am not sure why because in my project this file is there. I tried the npm install --save command but that didn't change anything. Any help appreciated
Try this steps
npm cache clean
npm i webpack-hot-middleware --save-dev

Resources