Cannot read property of 'fn' of undefined?

前提是你 提交于 2021-01-29 02:49:06

问题


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

  1. invalid reference to the file addresses or missing files (Your case).
  2. Duplicate reference to the Jquery.
  3. Overriding $ sign of Jquery in 3rd party libraries.
  4. Using Jquery functions before inserting Jquery (Not your case).
  5. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!