Fibers/future issue

Hi,

I’m having a issue while trying to import ‘Future’ from the “fibers/future” package.

I’m using:

  • meteor v1.5.2
  • node v4.8.4
  • fibers v2.0.0

Every time I try to import Future with “import {Future} from ‘fibers/future’” or “var Future = require(“fibers/future”)” I get an exception from the chrome console saying:

There is an issue with `node-fibers` ##
`/node_modules/fibers/bin/browser-undefined-undefined/fibers.node` is missing.

Try running this to fix the issue: undefined /node_modules/fibers/build

I’ve already tried to reinstall fibers by using “npm install fibers” etc., but no success so far… =/
In addition I tried to build a clean environment for testing this issue, but that also hasn’t made any difference.

Thank you!

Are you trying to import into client code? Fibers do not run on the client.

1 Like

ooo that was the issue! =) thank you very much!
But how is it then possible to wait for the Accounts.verifyEmail callback to finish?

It’s a callback - the code inside it is only executed when it’s finished. If you want to write sync-style code on the client you’ll need to use Promises and async/await. For this use case you would need to wrap Accounts.verifyEmail in a Promise.

Alternatively, you could set a ReactiveVar in the callback and pick up that change using an autorun where you need to use it.

1 Like