草庐IT

FILE_READ_ATTRIBUTES

全部标签

javascript - 未捕获的类型错误 : Cannot read property 'then' of undefined using Sweet Alert

我正在使用SweetAlert2我收到以下错误UncaughtTypeError:Cannotreadproperty'then'ofundefined当我使用与SweetAlert页面中建议的完全相同的代码时。swal({title:'Areyousure?',text:"Youwon'tbeabletorevertthis!",type:'warning',showCancelButton:true,confirmButtonColor:'#3085d6',cancelButtonColor:'#d33',confirmButtonText:'Yes,deleteit!',canc

javascript - jquery.fileupload.js :87 Uncaught TypeError: $. 小部件不是 jQuery-file-upload 上的函数

我尝试使用basicsource的示例(jquery-file-upload),我包含在我的html中的文件是:jquery.jsbootstrap.cssbootstrap.jsjquery.fileupload.cssjquery.iframe-transport.jsjquery.fileupload.js为了正确使用jquery-file-upload,我还应该包括什么吗?我的应用不需要使用jquery-ui。如果jquery-ui确实依赖于jquery-file-upload,是否有任何解决方法可以在没有jquery-ui的情况下使用它? 最佳答案

javascript - 未捕获的类型错误 : Cannot read property 'length' of undefined

我有一个插件可以访问许多元素的length属性。但是,javascript控制台指向jquery.min.js的第12行。我如何回溯以找到我的插件中有问题的行? 最佳答案 如果您使用缩小的脚本,任何调试器(例如完全最好的Firebug)都会向您显示相同的问题行,并且此信息毫无用处(缩小的脚本难以阅读和理解,并且它们写在一行中)。解决此类问题的几种方法:正如我之前所说:为了开发而不是缩小脚本,调试器会向您显示有意义的行,如果您幸运的话,您可以找到非常有用的开发人员评论。如果找不到完整版本的脚本,请使用像这样的unminifier:ht

javascript - jQuery 中的 "Uncaught TypeError: cannot read property ' 长度 ' of null"

我正在定义在我的HTML上按下按钮时发生的以下操作:$(document).ready(function(){$("#query").keydown(function(){//stuff$.get(url,function(result){console.log(result);varlist="";for(vari=0,l=result["results"].length;i'+result["results"][i]["label"]+'';}list="Herearesomeresults:"+list+"";});});到达“结果”的是一个JSON数组,格式如下:{"resul

javascript - 语义 ui 的 `gulp build` 给出错误 'ENOENT: no such file or directory'

版本:gulp@3.9.1我已经通过npminstall安装了semantic-ui并在交互式设置过程中给出了默认设置。但是当我从/semantic文件夹执行gulpbuild时,我收到以下错误:[20:52:27]Starting'build'...BuildingSemantic[20:52:27]Starting'build-javascript'...BuildingJavascript[20:52:27]Starting'build-css'...BuildingCSS[20:52:27]Starting'build-assets'...Buildingassets[20:5

javascript - 为什么 Angular 5 Transition 抛出 AppComponent.html :2 ERROR TypeError: Cannot read property 'forEach' of undefined

为什么Angular5会抛出这个错误?AppComponent.html:2ERRORTypeError:Cannotreadproperty'forEach'ofundefined我正在研究Angular动画的概念验证,我直接使用网站上的代码。我的组件如下所示:import{Component,OnInit}from'@angular/core';import{trigger,state,style,transition,animate,keyframes}from'@angular/animations';@Component({selector:'app-obj-list',te

javascript - 未捕获的类型错误 : Cannot read property 'injection' of undefined

关闭。这个问题需要debuggingdetails.它目前不接受答案。编辑问题以包含desiredbehavior,aspecificproblemorerror,andtheshortestcodenecessarytoreproducetheproblem.这将有助于其他人回答问题。关闭4年前。Improvethisquestion升级到16.x后出现以下错误UncaughtTypeError:Cannotreadproperty'injection'ofundefinedatinjectTapEventPlugin(injectTapEventPlugin.js:23)ateva

javascript - 访问 File 对象的某些列出的属性时返回 "undefined"

我似乎无法访问我的对象的宽度或高度键。我正在使用dropzone.js,它有一个addedFile事件,它返回文件和第一个参数。所以:varmyDropzone=newDropzone('#dropzone',{url:'/'});myDropzone.on('addedFile',function(file){console.log(file);});回调工作正常,在我的控制台中我看到:如您所见,显然可以使用高度和宽度键。myDropzone.on('addedFile',function(file){console.log(file.name);//returnsthewholes

javascript - 类型错误 : Cannot read property 'Roboto-Regular.ttf' of undefined

尝试使用JSAPIPdfMake构建PDF:然后根据thisHelloworld,我跑:vardocDef={content:'ThisisansamplePDFprintedwithpdfMake'}pdfMake.createPdf(docDef).download('optionalName.pdf');我遇到了这个错误:UncaughtTypeError:Cannotreadproperty'Roboto-Regular.ttf'ofundefined是否需要Roboto-Regular.ttf文件?如果是,放在哪里? 最佳答案

javascript - 类型错误 : Cannot read property 'error' of undefined on React Chrome Extension

我正在使用React-Chrome-Reduxlibrary开发ReactChrome扩展我是第一次用这个开发,一直卡在错误中,不知道是什么原因。我的弹出式应用程序在运行时失败,并在控制台上显示以下错误消息:Errorineventhandlerfor(unknown):TypeError:Cannotreadproperty'error'ofundefined我尝试调试并在错误的确切位置设置断点:returnnewPromise(function(resolve,reject){chrome.runtime.sendMessage({type:_constants.DISPATCH_