We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot resolve file or directory C:\app\node_modules\fibers\bin\win32-ia32-v8-3.14\fibers in C:\app\node_modules\fibers
Starts in index.js
GLOBAL.__webpack_public_path__ = ''; var options = require('../../webpack.config'); options.recursive = true; var myRequire = require('enhanced-require')(module, options); var boot = myRequire('server/boot');
boot.js:
var Fiber = require('fibers'); function sleep(ms) { var fiber = Fiber.current; setTimeout(function() { fiber.run(); }, ms); Fiber.yield(); } Fiber(function() { console.log('wait... ' + new Date); sleep(1000); console.log('ok... ' + new Date); }).run(); console.log('back in main');
Which is the default fiber example.
In pure node js works fine, with enhanced require I get this error.
They seem to require a binary file:
var fs = require('fs'), path = require('path'); // Seed random numbers [gh-82] Math.random(); // Look for binary for this platform var v8 = 'v8-'+ /[0-9]+\.[0-9]+/.exec(process.versions.v8)[0]; var modPath = path.join(__dirname, 'bin', process.platform+ '-'+ process.arch+ '-'+ v8, 'fibers'); try { fs.statSync(modPath+ '.node'); } catch (ex) { // No binary! throw new Error('`'+ modPath+ '.node` is missing. Try reinstalling `node-fibers`?'); } // Pull in fibers implementation module.exports = require(modPath).Fiber;
modPath is a string to a binary file.
I've somewhat figured out that if you would use the original require could work and it does. The problem is the way I do it is very ugly:
options.recursive = true; options.originalRequire = require; var myRequire = require('enhanced-require')(module, options);
And then I use it like this:
var Fiber = require.options.originalRequire('fibers');
Any better way? Or should I make an alias and wrap it in a single module?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Starts in index.js
boot.js:
Which is the default fiber example.
In pure node js works fine, with enhanced require I get this error.
They seem to require a binary file:
modPath is a string to a binary file.
I've somewhat figured out that if you would use the original require could work and it does. The problem is the way I do it is very ugly:
And then I use it like this:
Any better way? Or should I make an alias and wrap it in a single module?
The text was updated successfully, but these errors were encountered: