
🧨 원인
Uncaught DOMException: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'blob')
엑셀 다운로드 기능이 너무 레거시라 이번에 새로 만들면서 가이드를 다시 작성하는데 위와 같은 오류가 발생했다.
원인은 jquery 버전이 문제.
기존 1.2.x 버전에서
새로운 3.6.x 버전으로 버전업하여 해결하였다.
❤️ 주의사항
버전업 시 마이그레이션을 도와주는 툴이 있는데 jQuery Migrate이다.
만약 현재 쓰던 jQuery 버전이 1.9버전 미만이라면 jQuery Migrate 1.4.1 를 다운받고,
1.9 이상이라면 jQuery Migrate 3.3.2 를 다운받아야 한다.
https://jquery.com/download/#jquery-migrate-plugin
Download jQuery | jQuery
Download jQuery link Latest version To locally download these files, right-click the link and select "Save as..." from the menu. Download the compressed, production version: Download jQuery 3.7.1 The slim build is a smaller version, that excludes the ajax
jquery.com
나는 jQuery Migrate 1.4.1과 jQuery 3.7.1을 받았다.
React 쓰고싶다..
ref
'Languege > JavaScript' 카테고리의 다른 글
| invalid property value 에러 (0) | 2022.06.30 |
|---|