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

Usage from grunt-browserify not working #29

Open
sonicoder86 opened this issue Jul 15, 2014 · 5 comments
Open

Usage from grunt-browserify not working #29

sonicoder86 opened this issue Jul 15, 2014 · 5 comments

Comments

@sonicoder86
Copy link

I tried to use it from grunt but when i require 'fs' start getting the following error:

TypeError: Cannot read property 'range' of null

Any idea where doe it come from?

@sonicoder86
Copy link
Author

Got it working.
The problem is it needs the var statement at the start of line:

var fs = require('fs');

But this doesnt work:

var foo ='bar',
    fs = require('fs');

@Rob-pw
Copy link

Rob-pw commented Jan 15, 2015

@substack - I too am experiencing this error, however the fix proposed by @BlackSonic only resulted in a new error being raised:

Error: unsupported type for static module: Property
at expression:

  value: fs

@Rob-pw
Copy link

Rob-pw commented Jan 15, 2015

Depressingly enough downgrading all the way to [email protected] resolved the issue.

As a separate problem, it would appear that brfs doesn't work when fs is passed as a reference into functions.

@paulmelnikow
Copy link

Thanks for this great tool!

I had the same issue as blacksonic:

Works

var fs = require('fs');
var insertCss = require('insert-css');

Doesn't work

var fs = require('fs'),
    insertCss = require('insert-css');

@girvo
Copy link

girvo commented Mar 16, 2015

I've also run into this issue, using the straight brfs module (inside of Gulp).

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

4 participants