samsonjs/strftime

Initialization issue

Tomtomgo opened this issue · 2 comments

On Ubuntu 14.04, strftime version 0.9.0 and master branch at commit 8adfd97 I get an error on initialization of strftime.

Code:

strftime = require('strftime')

Error:

TypeError: 'undefined' is not a function (evaluating 'defaultStrftime.localize.bind(defaultStrftime)')


  /home/tom/project/node_modules/strftime/strftime.js:69 in adaptForwards
  /home/tom/project/node_modules/strftime/strftime.js:69 in adaptForwards
  /home/tom/project/node_modules/strftime/strftime.js:74
  /home/tom/project/node_modules/strftime/strftime.js:626
  /home/tom/project/node_modules/strftime/strftime.js:74
  /home/tom/project/node_modules/strftime/strftime.js:627
  /home/tom/project/node_modules/strftime/strftime.js:626
  /home/tom/project/node_modules/strftime/strftime.js:627

More searching shows that:

  • On line 69 there is no function bind on the defaultStrftime.localize object
  • The issue doesn't occur in nodejs or coffee REPLs
  • It only occurs in the phantomjs REPL

This doesn't seem to be your issue: ariya/phantomjs#10522.