Skip to content
New issue

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

ignoreMissing not working #50

Open
cellvia opened this issue Sep 3, 2014 · 1 comment
Open

ignoreMissing not working #50

cellvia opened this issue Sep 3, 2014 · 1 comment

Comments

@cellvia
Copy link

cellvia commented Sep 3, 2014

having pull request issues but if you add this at line 115

        if( !~file.indexOf(path.sep) ) return cb(new Error(
            'no path to module, and not in cache: "'+id+'" from file '
            + parent.filename
        ))

it will work... and if you need a test to verify

var mdeps = require('../');
var test = require('tape');

test('ignoreMissing should skip native modules if not cached', function (t) {
    t.plan(1);
    var p = mdeps({ignoreMissing: true});
    p.on('error', function(err){ t.fail(err) } );
    p.on('missing', function(msg){ t.pass(msg) } );
    p.write(__dirname + '/files/ignore.js');
    p.end();
});

with test/files/ignore.js:

require('fs');
@chrisabrams
Copy link

Bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants