2020.코딩일지

[에러해결]Module not found: Error: Can't resolve './reportWebVitals' 본문

JS & React

[에러해결]Module not found: Error: Can't resolve './reportWebVitals'

개발하는라푼젤 2022. 7. 23. 21:29
728x90

React

잘되다가 `npm start`하면 갑자기 이런에러가 떴....

 

Module not found: Error: Can't resolve './reportWebVitals' in ~~~

 

검색한대로

https://stackoverflow.com/questions/65396568/react-js-npm-start-shows-failed-to-compile-web-vitals

 

React JS npm start shows failed to compile web-vitals

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...

stackoverflow.com

`npm i web-vitals`했는데도 안되는건 왜그럴까ㅏㅏㅏㅏ

그리고 package.json에도 분명 web-vitals가 있는데 말이야....😕

package.json

 

이분 굉장히 꼼꼼히 알려주심!!.

/node_modules, package.json 지웠다가 다시깔고 재접속하고 

https://bobbyhadz.com/blog/react-module-not-found-cant-resolve-web-vitals

 

Fix - Module not found: Can't resolve 'web-vitals' (React) | bobbyhadz

To solve the error Module not found: Error: Can't resolve 'web-vitals', make sure to install the `web-vitals` package by opening your terminal in your project's root directory and running the command `npm install --save-dev web-vitals` and restart your dev

bobbyhadz.com

으아니 다했는데 그런데도 안됨??

🥵하ㅏㅏㅏ....

 

 

 

 

 

index.js에서 reportWebVitals 해당부분을 주석처리함ㅋ

해결✅

Comments