无法读取未定义的'fn'属性? [英] Cannot read property of 'fn' of undefined?

查看:90
本文介绍了无法读取未定义的'fn'属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的github页面上获取这些错误代码.我将这些作为加载脚本的顺序:

 < script src ="../../node_modules/jquery/dist/jquery.js"</script>< script src ="../../js/bootstrap.min.js"></script>< script src ="../../js/index.js"></script> 

以下是错误消息:

 获取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未捕获的TypeError:无法读取未定义的属性'fn'在util.js:56在util.js:10在bootstrap.min.js:6在bootstrap.min.js:6(匿名)@ util.js:56(匿名)@ util.js:10(匿名)@ bootstrap.min.js:6(匿名)@ bootstrap.min.js:6 

此处显示我的页面: https://tmolano.github.io/CareerMod4/

除了加载顺序之外,还有什么可能导致这种情况?

解决方案

此错误的可能原因:

未捕获的TypeError:无法读取未定义的属性'fn'

  1. 对文件地址的引用无效或文件丢失(您的情况).
  2. 对Jquery的重复引用.
  3. 在第三方库中重写Jquery的$符号.
  4. 在插入Jquery之前使用Jquery函数(不是您的情况).
  5. 在jquery中对WINDOW元素使用不推荐的语法进行加载,错误和卸载,而无需 on

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?

解决方案

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

这篇关于无法读取未定义的'fn'属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆