ybogdanov / node-sync

Write simple and readable synchronous code in nodejs using fibers
MIT License
492 stars 70 forks source link

ReferenceError: Fiber is not defined #25

Closed pvoisin closed 11 years ago

pvoisin commented 11 years ago

Hi! I was really pleased to find your module but I can't make it run. I'm getting the following error:

/.../workflow/node_modules/sync/lib/sync.js:108 var parent = Fiber.current; ^ ReferenceError: Fiber is not defined at Function.SyncFiber as Fiber at Sync (/.../workflow/node_modules/sync/lib/sync.js:89:21) at constructor.run (/.../workflow/tasks/command.js:38:17)

I'm running node 0.8.18 with today's node-sync module (0.2.1) via npm install sync and installed fibers via npm install fibers, which resulst in version 1.0.0.

Related code fragment is:

var synchronously = require("sync");

...

synchronously(function() {
   console.log("SYNCHRONOUSLY");
});
ybogdanov commented 11 years ago

Hi,

Thank you for your report. Fetch node-sync again, problem fixed.

pvoisin commented 11 years ago

Ah! It seems to result in something greener... :p

Many thanks!!

pvoisin commented 11 years ago

Erm... I'm still pretty new to GitHub and I'm trying to find a way to contact you privately for a technical question. Is there a way to achieve that within GitHub? What would be an alternative (except polluting this issue again... :))?