_meteor_bootstrap_.require not working in Meteor 0.6.4.1

340 views Asked by At

The code I inherited use _meteor_bootstrap.require, an internal meteor details, to load module. Look like it's no longer working with 0.6.4.1? any suggestions of how I should load modules?

Current code require = meteor_bootstrap.require
Future = require (fibers/future)

The error message I got: C:\Program Files (x86)\Meteor\lib\node_modules\fibers\future.js:173
throw(ex);
^
TypeError: undefined is not a function
at app/server/main.coffee.js:7:10
at C:\Users\jhuang\Documents\Tervela\5.0.16\i32\lib.meteor\local\build\server\server.js:306:12
at Array.forEach (native)
at Function..each..forEach (C:\Program Files (x86)\Meteor\lib\node_modules\underscore\underscore.js:78:11)
at run (C:\Users\jhuang\Documents\Tervela\5.0.16\i32 \lib.meteor\local\build\server\server.js:239:7)
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

1

There are 1 answers

0
Suburbio On BEST ANSWER

From v 0.6.0

Packages may depend on NPM modules, using the new Npm.depends directive in their package.js

Once included, package code can use Npm.require to pull in the module.

Future = Npm.require("fibers/future")

If you need to use this npm module in your app. Use meteor-npm

Future = Meteor.require("fibers/future")