草庐IT

Property

全部标签

javascript - 未捕获( promise 中)TypeError : Cannot read property 'setState' of undefined

这个问题在这里已经有了答案:Howtoaccessthecorrect`this`insideacallback(13个回答)关闭5年前。对我来说,这个错误在使用axios时很常见。我无法使用未定义的属性设置状态。尽管我得到了实际的回应。我很困惑。任何解决方案将不胜感激。json回复axios回复[{main:1,left:0,right:0,top:0,bottom:0,cid:6,'$created':'2016-10-21T11:08:08.853Z','$updated':'2016-10-22T07:02:46.662Z',stop:0}]code.jsimportReact

javascript - "TypeError: Cannot read property ' 申请 ' of undefined"

使用node、express、socket.io、jade和angular。收到错误:TypeError:Cannotreadproperty'apply'ofundefined。有什么建议吗?index.js:module.exports=function(app,res){res.render('index',{title:'Express'});vario=app.get('io');io.on('connection',function(socket){});};index.jade:extendslayoutblockcontentscript.varapp=angular.

javascript - "TypeError: Cannot read property ' 申请 ' of undefined"

使用node、express、socket.io、jade和angular。收到错误:TypeError:Cannotreadproperty'apply'ofundefined。有什么建议吗?index.js:module.exports=function(app,res){res.render('index',{title:'Express'});vario=app.get('io');io.on('connection',function(socket){});};index.jade:extendslayoutblockcontentscript.varapp=angular.

jquery - 如何解决 Bootstrap node.js 应用程序中未定义的错误 "Cannot set property ' emulateTransitionEnd'?

我从头开始创建Node.js应用程序,并在app.js中添加。global.jQuery=require('jquery');之后它给了我如下错误:/home/yojna/web/node_modules/bootstrap/js/transition.js:36$.fn.emulateTransitionEnd=function(duration){^TypeError:Cannotsetproperty'emulateTransitionEnd'ofundefinedat/home/yojna/web/node_modules/bootstrap/js/transition.js:

jquery - 如何解决 Bootstrap node.js 应用程序中未定义的错误 "Cannot set property ' emulateTransitionEnd'?

我从头开始创建Node.js应用程序,并在app.js中添加。global.jQuery=require('jquery');之后它给了我如下错误:/home/yojna/web/node_modules/bootstrap/js/transition.js:36$.fn.emulateTransitionEnd=function(duration){^TypeError:Cannotsetproperty'emulateTransitionEnd'ofundefinedat/home/yojna/web/node_modules/bootstrap/js/transition.js:

node.js - Typescript mongoose 静态模型方法 "Property does not exist on type"

我目前正在尝试向我的mongoose架构添加一个静态方法,但我找不到它不能以这种方式工作的原因。我的模特:import*asbcryptfrom'bcryptjs';import{Document,Schema,Model,model}from'mongoose';import{IUser}from'../interfaces/IUser';exportinterfaceIUserModelextendsIUser,Document{comparePassword(password:string):boolean;}exportconstuserSchema:Schema=newSch

node.js - Typescript mongoose 静态模型方法 "Property does not exist on type"

我目前正在尝试向我的mongoose架构添加一个静态方法,但我找不到它不能以这种方式工作的原因。我的模特:import*asbcryptfrom'bcryptjs';import{Document,Schema,Model,model}from'mongoose';import{IUser}from'../interfaces/IUser';exportinterfaceIUserModelextendsIUser,Document{comparePassword(password:string):boolean;}exportconstuserSchema:Schema=newSch

javascript - 构建开发失败 : Cannot set property 'fileSystem' of null

我正在尝试运行Ionic2应用程序。我在运行ionicserve时遇到以下错误builddevfailed:Cannotsetproperty'fileSystem'ofnull完整的日志如下:λionicserve>ionic-hello-world@ionic:serveD:\ionic>ionic-app-scriptsserve[18:11:23]ionic-app-scripts0.0.47[18:11:24]watchstarted...[18:11:24]builddevstarted...[18:11:24]cleanstarted...[18:11:24]cleanf

javascript - 构建开发失败 : Cannot set property 'fileSystem' of null

我正在尝试运行Ionic2应用程序。我在运行ionicserve时遇到以下错误builddevfailed:Cannotsetproperty'fileSystem'ofnull完整的日志如下:λionicserve>ionic-hello-world@ionic:serveD:\ionic>ionic-app-scriptsserve[18:11:23]ionic-app-scripts0.0.47[18:11:24]watchstarted...[18:11:24]builddevstarted...[18:11:24]cleanstarted...[18:11:24]cleanf

javascript - 升级到 Babel 7 : Cannot read property 'bindings' of null

我刚刚升级到Babel7(从6开始)通过运行以下命令:npmremovebabel-clinpminstall--save-dev@babel/cli@babel/core@babel/preset-env这是我的.babelrc文件:{"presets":["env"]}然后我跑了:babeljs/src--out-dirjs/dist结果是:TypeError:Cannotreadproperty'bindings'ofnullatScope.moveBindingTo(/xyz/node_modules/@babel/traverse/lib/scope/index.js:867