[SOLVED] Bootstrap: "Uncaught TypeError: Cannot read property 'fn' of undefined"

Hi. I am working on creating a menu using the Bootstrap library. I connected all the dependencies following this instruction. However, on startup I get an error: [bootstrap.min.js:6]: Uncaught TypeError: Cannot read property 'fn' of undefined

Link to the project: https://playcanvas.com/editor/scene/708562

I removed the connection of scripts using CDN, loaded them into the game editor, set the scripts loading orders and everything worked!

2 Likes

Hi, can you help me a little?
I’m sure it is a very simple question but how did you load the bootstrap.js and jquery.js? I can’t see it in your code…
Or is it that simple… it is loaded just by adding it to your file system and check preload?!

Hi @Patrick_Munster,

Yes it’s so simple, you can add them to your project, check preload and also make sure they are coming first in the Scripts Loading Order list (under project settings). Before any other script tries to call methods from these libraries:

image

1 Like

OMG!
My whole PlayCanvas world has changed! Thank you!

2 Likes