Note that there are some explanatory texts on larger screens.

plurals
  1. POmoment-isocalendar not working
    primarykey
    data
    text
    <p>According to their documentation, all one needs to do is require the <code>moment-isocalendar</code> module.</p> <p>This does not work:</p> <pre><code>var m = require("moment"); var i = require("moment-isocalendar"); m().isocalendar(); </code></pre> <p>It throws</p> <pre><code>TypeError: Object Tue Aug 13 2013 18:20:36 GMT+0300 has no method 'isocalendar' at repl:1:6 at REPLServer.self.eval (repl.js:110:21) at Interface.&lt;anonymous&gt; (repl.js:239:12) at Interface.EventEmitter.emit (events.js:95:17) at Interface._onLine (readline.js:202:10) at Interface._line (readline.js:531:8) at Interface._ttyWrite (readline.js:760:14) at ReadStream.onkeypress (readline.js:99:10) at ReadStream.EventEmitter.emit (events.js:98:17) at emitKey (readline.js:1095:12) </code></pre> <p>I looked at the module (all were installed with <code>npm</code>), and it requires the "moment" and monkey-patches it. I tried requiring the <code>moment-isocalendar</code> before the <code>moment</code> module, but got the same result. The <code>moment-isocalendar</code> is an empty object after the monkey-patch <code>{}</code>.</p> <p>Has anyone used a momentjs plugin in nodejs before? Any ideas how to make this work?</p> <p><strong>Later edit</strong></p> <p>It works in nodejs v0.10.12, it doesn't work in nodejs v0.10.15. I added an answer.</p> <p><strong>Later edit</strong></p> <p>I'm running Ubuntu 13.04 with 3.8.0-26-generic kernel, and the nodejs is installed via package manager from ppa:chris-lea/node.js</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload