问题
Getting these error codes on my github pages. I have these as my order of loading scripts:
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script src="../../js/index.js"></script>
Here are the error messages:
GET https://tmolano.github.io/CareerMod4/node_modules/jquery/dist/jquery.js 404 ()
index.html:115 GET https://tmolano.github.io/CareerMod4/node_modules/popper.js/dist/popper.min.js 404 ()
util.js:56 Uncaught TypeError: Cannot read property 'fn' of undefined
at util.js:56
at util.js:10
at bootstrap.min.js:6
at bootstrap.min.js:6
(anonymous) @ util.js:56
(anonymous) @ util.js:10
(anonymous) @ bootstrap.min.js:6
(anonymous) @ bootstrap.min.js:6
Heres my page: https://tmolano.github.io/CareerMod4/
Other than the order of loading, what else could be causing this?
回答1:
Possible reasons for this error:
Uncaught TypeError: Cannot read property 'fn' of undefined
- invalid reference to the file addresses or missing files (Your case).
- Duplicate reference to the Jquery.
- Overriding $ sign of Jquery in 3rd party libraries.
- Using Jquery functions before inserting Jquery (Not your case).
- Using deprecated syntax for load,error,unload on WINDOW element in jquery without
on
来源:https://stackoverflow.com/questions/52451388/cannot-read-property-of-fn-of-undefined