node.js - NPM Install / Authy API TypeError in NodeJS -


I have installed on my NodesJS app and as long as I'm not coming up with these big wrong messages, good was working. Inside the plugin I think this copy module is missing, but npm install copy npm update copy did not help. [Type error: object function (comparative) {for (var i = 0; i & lt; this.length; i ++) {if (comparative (this [i])) True back; } return false; } There is no way to 'copy' TypeError: Object function (comparative) {for (var i = 0; i & lt; this.length; i ++) {if (comparative (this [i])) return true; } return false; } There is no method 'copy on the message coming in. & Lt; Anonymous & gt; (/home/.../node_modules/authy-node/authy.js:166:13) at IncomingMessage.EventEmitter.emit (events.js: 117: 20) at _stream_readable.js: 920: 16 on args. (Anonymous function) (/home/.../node_modules/nodetime/lib/core/proxy.js:131:20) on the process. _com callback (node ​​.js: 415: 13)

Is this possible copy not being installed correctly ...?

  $ npm installed per npm horn package. Json copy@0.0.1 There is no repository field. Npm WARN package.json eyes@0.1.8 No repository field NPM HTPT http://registry.npmjs.org/copy NMM HP 304 http://registry.npmjs.org/copy copy@0.0.1 node_module / copy  

update

Authy and this scenario should still work, even if the array prototype is increased Given Based on this, it is actually two different examples of bad practices within Javascript:

Original Answer

It has nothing to do with the copy module Is due to. First of all, due to authy using a ... in the loop is due to be repeated on an array of verbs. This is one, as was proved by the exception which was thrown. They should have used the standard for loop based on the data. The length I have deposited with the repo which will fix this problem in the Oath module.

So why was the exception thrown? It leads us towards other bad behaviors. You should not expand the original objects in javascript! Someone (maybe in your code, perhaps in another module) has increased the array prototype, based on the actions shown in the exception:

  function (comparative) {for (var i = 0 ; I & lt; this.length; i ++) {if (comparative (this [i])) is true; }   return false; }  

It seems that someone has expanded with arrays as explained here:

If you can find such code and remove it , Then authy should start working again.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -