'Cannot read property 'defineClass' of undefined' error
dev-jonghoonpark opened this issue · comments
jonghoonpark commented
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?
jonghoonpark commented
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>