http-browserify icon indicating copy to clipboard operation
http-browserify copied to clipboard

Suggested Setup in README Doesn't Work

Open codeviking opened this issue 11 years ago • 3 comments

When I dial this into the latest browserify:

var bundle = browserify({
    require : { http : 'http-browserify' }
});

I get an error saying Error: path must be a string.

Please update with correct configuration instructions!

codeviking avatar Oct 14 '14 00:10 codeviking

Did you ever manage to resolve this? I'm also experiencing the same issue. Wonder if the browserify api has changed fairly recently.

skyhaikuteam avatar Jan 09 '15 16:01 skyhaikuteam

@skyhaikuteam I did not. I ended up not using the package due to the issue.

codeviking avatar Jan 09 '15 17:01 codeviking

@codeviking @skyhaikuteam browserify now automatically uses http-browserify for http by default:

https://github.com/substack/node-browserify/blob/master/lib/builtins.js

exports.http = require.resolve('http-browserify');

the config from the readme is no longer needed (and should probably be deleted):

deathcap avatar Feb 11 '15 04:02 deathcap