관리 메뉴

웹개발 블로그

[React/에러] Module not found: Error: Can't resolve 'web-vitals' in 본문

◆React.js & Next.js & Node.js/에러

[React/에러] Module not found: Error: Can't resolve 'web-vitals' in

쿠키린 2025. 1. 20. 10:01

에러 메시지

Module not found: Error: Can't resolve 'web-vitals' in 'D:\경로'

원인

경로의 해당 모듈을 찾을 수 없다는 오류였다.

해결책

npm i web-vitals --save-dev

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

I'm getting the error: 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...

stackoverflow.com

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

 

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

To solve the error Module not found: Error: Can't resolve 'web-vitals', install the `web-vitals` package.

bobbyhadz.com

확인

 

package.json에 web-vitals 패키지가 추가된것을 알 수 있다.