> ## Content Index
> Fetch the complete content index at: https://www.popit.kr/llms.txt
> Use this file to discover other available public pages before exploring further.

# bootstrap과 jquery 3.x 버전
- URL: https://www.popit.kr/bootstrap-and-jquery-3/
- Published: 2016-10-27T03:24:37.000Z
- Updated: 2016-10-29T05:34:48.000Z
- Author: 김형준
- Tags: #소프트웨어, bootstrap, jquery

최근 bootstrap 사용할 일이 있어 초기 설정 중에 다음과 같은 에러 사항이 발생하여 몇가지 확인을 해 봤습니다. 자바스크립트 오랜만에 하려니 이런것도 삽질하게 되네요.

> Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

bootstrap에서는 jquery 1.9.1 이상이 필요한데 version 3 보다 낮다라는 의미인데 설치된 jquery 버전을 확인해보니 3.1.0 이었습니다. 그래서 다시 bootstrap.js를 확인해보니 다음과 같이 jquery 3.x 버전에 대한 고려 자체가 안되어 있었습니다.  

```
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1))) {
  throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
}
```

bootstrap 이슈를 확인해 보니 다음 이슈로 처리 완료되어 있었습니다.

- [https://github.com/twbs/bootstrap/issues/16834](https://github.com/twbs/bootstrap/issues/16834?ref=popit.kr)

결론은 **bootstrap 3.3.7 이상 버전**에서는 해결되었다 입니다. 위 코드를 보면 다음과 같이 변경되어 있습니다.  

```
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
  throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
}
```