草庐IT

error-logging

全部标签

javascript - AngularJS fn is not a function error using $timeout with a function with parameters 错误

我正在制作一个您可以编辑文本的网页,在您停止输入1秒后,它会自动保存您输入的内容。目前我正在研究$timeout的细节。当我调用没有参数的update方法时,它可以正常工作,但是当我使用参数调用它时,我得到错误:Error:fnisnotafunction$TimeoutProvider/this.$get为什么我在执行以下操作时会收到此错误:timeout=$timeout(update(element,content),1000);但不是当我这样做的时候:timeout=$timeout(update,1000);显然我需要将参数传递给更新方法,因为我需要知道要更新什么。debou

javascript - 什么将解决 WebDriverError : Connection refused error message?

我无法在本地运行Protractor测试,几天前我可以,但现在我不能。我什至重新启动了Ubuntu。这是我的版本:$cat/etc/issueUbuntu14.04.5$node--versionv6.8.0$npmlist-g|grepprotractor└─┬protractor@4.0.9$webdriver-managerstatus[13:49:58]I/status-seleniumstandaloneversionavailable:2.53.1[default][13:49:58]I/status-chromedriverversionavailable:2.22[de

javascript - 为什么在 log 之后声明的内部函数中有相同的变量名时,内部函数中的变量返回 nan

这个问题在这里已经有了答案:Whydoesshadowedvariableevaluatetoundefinedwhendefinedinoutsidescope?(6个答案)'Hoisted'JavaScriptVariables(7个答案)关闭3年前。这里发生了什么?如果我在内部函数中的console.log之后声明一个变量,我会得到不同的结果我知道var有一个功能范围,内部函数可以从它们的父级访问变量functionouter(){vara=2;functioninner(){a++;console.log(a)//logNaNvara=8}inner()}outer()func

javascript - Node.js websocket 错误 "Error: listen EADDRNOTAVAIL Error: listen EADDRNOTAVAIL"

应用程序在本地主机上工作正常。但是当它连接到服务器时出现错误。我通过端口22连接服务器这是错误Error:listenEADDRNOTAVAILError:listenEADDRNOTAVAILaterrnoException(net.js:904:11)atServer._listen2(net.js:1023:19)atlisten(net.js:1064:10)atnet.js:1146:9atdns.js:72:18atprocess._tickCallback(node.js:419:13)atFunction.Module.runMain(module.js:499:11)

javascript - Google reCAPTCHA V3.0 不工作。 "ERROR for site owner: Invalid key type"

我无法让GooglereCAPTCHA处理我的Squarespace表单。SiteKey和SecretKey都输入正确。两个域也已输入。两个客户端集成代码都已放入页面的页眉中即使在等待30分钟左右、创建一组新key并通过替换旧代码执行相同的过程后,我仍然遇到此错误消息,即使是从另一种媒体访问页面时也是如此。网页链接:https://mydietgoal.com/contact-us如果有人知道如何将V3.0验证码集成到Squarespace中,将不胜感激! 最佳答案 Squarespace表单block目前不支持reCAPTCHAV

javascript - 在 console.log 中显示对象属性的原始顺序

我需要进行一些调试以查看一个JavaScript对象属性的原始顺序,但是(至少在chromedevtools中)console.log()向我显示了一个按字母顺序排列的对象。例如:varobj={z:1,t:2,y:3,a:4,n:5,k:6}console.log(obj)显示:Object{z:1,t:2,y:3,a:4,n:5…}a:4k:6n:5t:2y:3z:1//expected(needed)originalorderz:1t:2y:3a:4n:5k:6 最佳答案 console.log确实对属性进行了排序,在某些情况

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_

javascript - Firebase "throw new Error(' 提供的服务帐户无效');"错误消息

我注意到Firebase最近发生了变化。我正在构建一个需要firebase的node.js应用程序,以前这就足够了:varFirebase=require("firebase");varfirebaseRef=newFirebase("https://blabla.firebaseio.com/");根据此链接:https://firebase.google.com/docs/web/setup#prerequisites您需要在新的firebase控制台中创建一个firebase项目,然后将firebase添加到您的网络应用程序中。这给你类似的东西://InitializeFireb

javascript - 错误 : Uncaught (in promise): Error: Cannot match any routes RC4 Child Routes

在Angular应用程序中实现子路由的演示应用程序Angular2应用程序显示错误Error:Uncaught(inpromise):Error:Cannotmatchanyroutes:'movie-home'zone.js:461UnhandledPromiserejection:Cannotmatchanyroutes:'movie-home';Zone:angular;Task:Promise.then;Value:Error:Cannotmatchanyroutes:'movie-home'(…)如果我不从文件movie.routes.ts添加这些代码行,应用程序工作正常{p

javascript - npm outdated -g Error 'Cannot read property ' length' of undefined'

我正在尝试确定我的npm安装的全局包的版本状态。在终端中运行npmoutdated-g--depth=0后,我收到此错误:npmERR!Cannotreadproperty'length'ofundefinednpmERR!Acompletelogofthisruncanbefoundin:npmERR!/Users/dangranger/.npm/_logs/2019-03-14T21_58_37_962Z-debug.log/Users/dangranger/.npm/_logs/2019-03-14T21_58_37_962Z-debug.log的内容0infoitworkedi