자바스크립트
ReferenceError: File is not defined 에러 해결 방법
Jake Seo
2024. 5. 1. 16:09
ReferenceError: File is not defined 에러
이 에러를 만났다면, 아마 Node.js 에서 File 객체를 이용한 코드를 작성했을 것이다
if (something instanceof File) {
// ...
}
해결 방법
- Node.js 버전을 20.9 윗버전으로 업그레이드 하면 된다.
- 참고 링크
노드 버전 업그레이드 없이 해결하는 방법
- web-std 의존성을 설치하면 된다.
반응형