我试图在node.js中运行一个简单的屏幕抓取应用程序。代码发布在这里:
服务器很好地启动,但是当我对它运行查询时,我会得到以下错误。有人知道为什么吗?
TypeError: Object #<Object> has no method 'on'
at Object.<anonymous> (/Users/avishai/Downloads/anismiles-jsdom-based-screen-scraper-f0c79d3/searcher-server.js:9:10)
at param (/Users/avishai/.nod
如果我有var foo = 'bar';,我如何获得所有可在foo上调用的函数,比如toUpperCase?它不是一个对象,所以无法工作:
$ node
> var foo = 'bar';
undefined
> console.log(Object.getOwnPropertyNames(foo));
TypeError: Object.getOwnPropertyNames called on non-object
at Function.getOwnPropertyNames (native)
at repl:1:20
我已经在角2应用程序中集成了角完整日历,但是当我试图从json文件中获取数据时,保存事件列表在console.log中出现了一个错误。错误:
ERROR SyntaxError: Unexpected token : in JSON at position 6
at Object.parse (<anonymous>)
at Response.Body.json (http.es5.js:796)
at MapSubscriber.project (events.service.ts:15)
at MapSubscriber._next (map.j
是否可以扩展/初始化require('stream').Stream;对象?我希望能够创建一个可以将数据推送到其中的流对象,并在新数据到达时通知所有侦听器。
我尝试了以下几种方法:
var stream = require('stream');
var test = new stream.Stream();
test.write(new Buffer('mads'));
但我得到以下错误:
TypeError: Object [object Object] has no method 'write'
at repl:1:6
我已经尝试过同样的方法,在消防文档中给出。但这是我遇到的错误。
functions: Failed to load functions source code. Ensure that you have
the latest SDK by running **npm i --save firebase-functions** inside the
functions directory.
functions: Error from emulator. FirebaseError: Error occurred while
parsing your function triggers
可以在浏览器控制台中调用console.debug()函数。
但是,在Nodejs中调用console.debug()时有一个错误。
TypeError: Object #<Console> has no method 'debug'
at Object.<anonymous> (c:\share\node\receive.js:20:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at
我正在尝试使用我自己的网络密码创建一个出色的独立网络。我能够在我的私有网络中设置stellar-core和horizon,它工作得很好,我能够通过我的nodejs代码获得根账户余额。但是,当我试图创建一个帐户并为其提供资金时,我会得到一个tx_bad_seq。以下是我的代码 let kp = Stellar.Keypair.random();
let destinationId = kp.publicKey();
let sourceId = "GAZDSYG5HWIKHR76LUP5SGQBPYXYCFUIR45Z2WMOGITGY7JILDC6JAAF";
let sou
我在连接我的mongohq数据库时遇到了很大的问题。我遵循本教程,但使用远程mongoHQ db:替换本地mongo DB
wines.js
var mongo = require('mongodb');
Db = mongo.Db;
BSON = mongo.BSONPure;
con = null;
server = new Server('troup.mongohq.com', 'mongo_port', {auto_reconnect: true});
DBCon = new Db('dev', server, {sa
我在尝试让表单与angularjs一起工作时遇到了问题。下面是错误
{"error": "Shell form does not validate{'html_initial_name': u'initial-js_lib', 'form': <mooshell.forms.ShellForm object at 0x9bd4f8c>, 'html_name': 'js_lib', 'html_initial_id': u'initial-id_js_li
在设置完所有在Alexa开发人员中测试技能时得到的错误后,所请求的技术的响应出现了问题,然后我将json响应放在lambda测试中,得到了以下结果
{ "errorType": "TypeError", "errorMessage": "Cannot convert undefined or null to object", "trace": [ "TypeError: Cannot convert undefined or null to object", " at Function.ke
我需要删除符合某些标准的文件..。
server/methods.js
Meteor.methods({
rA: function (a) {
As.remove({aId:a}, {multi:true});
}
});
As集合有具有相同aId的文档,它是a
client/js
var a = this.aId;
Meteor.call('rA', a);
我在我的终端上发现了以下错误:
I20151231-06:39:24.849(7)? Exception in Mongo write: TypeError: object is not a
我正在尝试实现ecc库的NodeJS,。
我要运行的文件是,
https://github.com/jpillora/eccjs/blob/gh-pages/examples/simple.js
问题是,当我试图使用node simple.js命令运行文件时,我得到以下错误:
eccjs-gh-pages/examples/simple.js:31
var keys = ecc.generate(ecc.ENC_DEC);
^
TypeError: Object function ecc() {
return new ECC();
} has no metho
在用户登录后使用socketio时,我收到了以下错误。我发现护照可能解决了这个问题,但我不知道如何将它集成到sails.js中。你知道什么代码示例吗?自认为
error: TypeError: Object #<Object> has no method 'isAuthenticated'
at module.exports (/Users/peng/www/321bougez/api/policies/isAuthenticated.js:13:11)
at _bind.enhancedFn (/Users/peng/www/321bougez/node_modu
我在用angular-dashboard-framework。它在ruby on rails应用程序中运行良好,但当我与rails应用程序分离时,它给了我以下错误
错误:$injector/unpr?p0=%24uibModalProvider%20%3C-%20%24uibModal%20%3C-%20adfDashboardDirective:$injector:unpr未知提供者:$uibModalProvider <- $uibModal <- adfDashboardDirective
at angular.js:68
at angular.js:4284
at
此脚本无法反序列化我的对象。错误为TypeError: this.buf.readUInt32LE is not a function TypeError: this.buf.readUInt32LE is not a function
at BinaryReader.readU32 (index.js:165)
at BinaryReader.propertyDescriptor.value (index.js:136)
at BinaryReader.readString (index.js:194)
at BinaryReader.propertyDes
在控制台中,经常会显示程序中出现错误的位置。但是,它常常切换到无法识别的代码,如下面所示,我无法识别程序中的错误实际发生在何处。例如:
main.19a9909fcffaac58.js:1 ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'
at e.find (main.19a9909fcffaac58.js:1)
at D.ngDoCheck (main.19a9909fcffaac58.js:1)
at la (main.19a9909
当测试用例失败时,我想记录额外的数据。在哪里可以最好地插入自定义错误处理程序?
例如:
cy.get('something')
.should('have.property', 'blah')
当这在Cypress仪表板中失败时,我得到:
CypressError: Timed out retrying: expected 'something' to have a property 'blah'
at Object.cypressErr (https://my.website.com/__cypress/
我很难用jooc包装的一个子集。库不使用对象属性,而是实现融合的getter-setter函数。
simulation.force("x", d3.forceX()) // setter
simulation.force("x") // getter
我想找到一种方法来模拟OCaml中的相同类型的多态性。这是我目前的情况
module Force = struct
class type force = object
(* not important *)
end
let x (): force Js.t = J
我有一些关于new date ()的错误;我使用了node js和插件express npm,我构建了变量date,但是一些错误的编译是错误的
这是我的代码.js
var update_time = new Date();
update_time.formatDate("y/m/d");
然后我运行node this is error
/home/kingdark/Repos/api/epg/node_modules/xml2js/lib/xml2js.js:216
throw ex;
^
TypeErro
我使用three.js对一个AR应用程序在使用JSARToolKit检测到的标记上显示一个3D对象(从Maya导出到三个an )。
--它在本地主机上工作得很好(我看到了纹理),但是当我将它上传到网上时(github),我看到预览对象都是黑色的,没有纹理(比如我删除了光线)。
// load the model
var loader = new THREE.JSONLoader;
var object;
//var geometry = new THREE.BoxGeometry(1, 1, 1);
loader.load('js/object3d.js', function(
我目前正在创建一个待办事项列表应用程序,并且在运行app.js时给出了这个错误。
快递
500 TypeError: Object #<Object> has no method 'uid'
at Object.exports.current_user [as handle] (C:\Users\steph_000\SkyDrive\Documents\Programs\Todo List App\todo\routes\index.js:95:34)
at next (C:\Users\steph_000\SkyDrive\Documents\Programs\T
我想用离子2和angularfire 2开发一个示例应用程序。
我成功地将angularfire 2集成到Ionic 2中,但是当我试图从firebase获取数据时,我在浏览器控制台中得到了以下错误:
`XCEPTION: Error: Uncaught (in promise): EXCEPTION: Error in :0:0
ORIGINAL EXCEPTION: TypeError: Firebase is not a constructor
ORIGINAL STACKTRACE:
TypeError: Firebase is not a constructor
at exp
因此,在尝试从GraphCool后端获取数据时,我将收到以下错误消息:
Uncaught Error: AllPostsComments.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.
at invariant (http://localhost:7770/static/bundle.js:3026:16)
at ReactCompositeComponentWrapper._r
当您看不到堆栈跟踪和错误的上下文时,这会使开发变得非常困难。有什么方法可以使本地文本错误更加透明吗?如何处理错误上下文?
JS: ERROR TypeError: format.replace is not a function
JS: ERROR CONTEXT [object Object]
要搜索这个空变量真的很困难。干草堆里的一根针。
我创建了一个只包含一行代码的脚本:
console.log('userid: ' + process.getuid());
当我使用命令node filename.js运行脚本时,出现以下错误:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object #<EventEmitter> has no method 'getuid'
at Object.<anonymous>