FrontEnd/React.js
[React.js] Uncaught ReferenceError: process is not defined
푸고배
2022. 4. 12. 18:53
오류 설명
이 오류는 react-error-overlay(react-scripts의 dependency이기 때문에 많은 사람들에게 생소함)의 결과로, 이 패키지의 종속성이 webpack v5를 지원하도록 업데이트되었다.
해결 방법
첫 번째 방법, update react-scripts v5
npm install react-scripts@latest
# or
yarn upgrade --latest react-scripts
하지만 webpack 버전 5이상은 폴리필을 수동으로 구성해야하기 때문에 아래와 같은 에러가 발생할 수 있다.
[Webpack] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default
두 번째 방법, Install react-error-overlay
npm i -D react-error-overlay@6.0.9
# or
yarn add -D react-error-overlay@6.0.9
Reference
React Uncaught ReferenceError: process is not defined
I am getting issues with iframe. Till today everything was working as expected. Today I added a very simple Modal component and somehow iframe started appearing. It appears when I am editing the fi...
stackoverflow.com
반응형