Lv1プログラマの誰得メモ

総務女子の趣味とか勉強に関係することのメモ

Uncaught TypeError: Cannot read property 'step' of undefined

bootstrap(4.5.0)とjQueryUI(1.12.1)を併用しようとした際に、以下のエラーが発生した。

f:id:megsan:20201217125710j:plain Uncaught TypeError: Cannot read property 'step' of undefined
at String. (jquery-ui.min.js:6)
at each (jquery-3.5.1.slim.min.js:2)
at Function.l.hook (jquery-ui.min.js:6)
at jquery-ui.min.js:6
at jquery-ui.min.js:6
at jquery-ui.min.js:6
at jquery-ui.min.js:6

stackoverflowで解決された問題のようなので結論を言うと、
jQueryのスリム版はjQueryUIに必要な機能をいくつか削除してるから、スリム版は使わないように
https://stackoverflow.com/questions/45356723/jquery-ui-cannot-read-property-step-of-undefined

bootstrapのページから必要な記載を丸っとコピペできるのでよく中身は確認してませんでしたが、確かにスリム版使ってる。 ここはおとなしくフル版に差し替えましょう。 f:id:megsan:20201217125729j:plain