nhn / tui.time-picker

Component that selects specific time.

Home Page:https://nhn.github.io/tui.time-picker/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'Cannot read property 'defineClass' of undefined' error

dev-jonghoonpark opened this issue · comments

I've loaded the files according to the instructions.
https://github.com/nhnent/tui.time-picker/blob/production/docs/getting-started.md

    <link rel="stylesheet" href="https://uicdn.toast.com/tui.time-picker/latest/tui-time-picker.css">

    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <script src="https://uicdn.toast.com/tui.time-picker/latest/tui-time-picker.js"></script>
    <script src="/resources/js/tui-code-snippet.min.js"></script>

    <script>
        $(function () {
            var tpSelectbox = new tui.TimePicker('#timepicker-selectbox', {
                inputType: 'selectbox'
            });
        });
    </script>

But, I encountered this error.

Uncaught TypeError: Cannot read property 'defineClass' of undefined
    at Object.<anonymous> (no-conflict.js:13)
    at __webpack_require__ (no-conflict.js:13)
    at Object.<anonymous> (no-conflict.js:13)
    at __webpack_require__ (no-conflict.js:13)
    at Object.<anonymous> (no-conflict.js:13)
    at __webpack_require__ (no-conflict.js:13)
    at no-conflict.js:13
    at no-conflict.js:13
    at webpackUniversalModuleDefinition (no-conflict.js:11)
    at no-conflict.js:11

there is something wrong what I did?

self solved...
tui-code-snippet.js should load faster than tui-time-picker.js

so it should be

    <script src="/resources/js/tui-code-snippet.min.js"></script>
    <script src="https://uicdn.toast.com/tui.time-picker/latest/tui-time-picker.js"></script>