Vue.js 3, Cli - bootstrap 을 적용하던 와중 발생한 에러.

 

 

Uncaught TypeError: Cannot read properties of undefined (reading 'prototype') at eval 

 

해당하는 에러가 발생하였다. 

 

 

 

에러 발생 원인 - 아직 지원하지 않는다?

 

여러 문서들을 뒤적거린결과, bootstrap은 아직  Vue.js 3를 지원하지 않는다고 합니다... ㅠ

그렇기 때문에 Vue.js 3 => Vue.js 2  [downgrade] 를 해주시거나,

다른 css 프레임워크를 사용해주시면 되겠습니다... ㅠㅠ

 

아직 alpha 버전이며, 앞으로 헤쳐나갈 것들이 많다고 합니다.. ㅠㅠ

 

 

 

 

bootstrap-vue-3

Early (but lovely) implementation of Vue 3, Bootstrap 5 and Typescript

www.npmjs.com

 

반응형

수정 21.09.01.10:11

에러해결 - ReactDOM.Component => React.Component

DOM이 아니라 그냥 React만 호출해야했다.


VM42:9 Uncaught TypeError: Super expression must either be null or a function, not undefined

React.js 하던와중 갑자기 이런 에러가 발생

왠지모르겠음.. 

super()를 선언할때 인자로 null 혹은 function이 들어가야하는데 undefined가 들어갔다. 라는 뜻 같은데..

props에 해당하는 부분이 undefined 된건가?

흠.

 

코드는 대충 클릭이벤트 함수를 생성한것인데, 이렇다. 

 

<body>
    <div id="root"></div>

    <script type="text/babel">
        class App extends ReactDOM.Component {
            constructor (props) {
                super(props)
                this.state = {
                    count : 0
                }
                this.countUp = this.countUp.bind(this)
            }
            render () {
                return (
                    <div>
                        <h1>클릭한 횟수 : {this.state.count}</h1>
                        <button onClick={this.countUp}>클릭</button>
                    </div>
                    )
            }
    
            countUp (event) {
                this.setState({
                    count: this.state.count + 1
                })
            }
            
        }

        const container = document.querySelector("#root")
        ReactDOM.render(<App />, container)

        
    </script>


</body>

 

 

반응형

+ Recent posts