Sadly the error message is not very helpful, but what's happening is this:
Browserify uses the resolve
module to look up the files require
calls should be loading. Somehow instead of being passed a path as normally, it got something else (i.e. not a string).
This could theoretically be almost anything, but I'm guessing it's either undefined
or some really absurd value like an object or function. Basically anything that could theoretically be passed to require
and result in garbage.
You didn't say whether you updated modules, added new transforms or modified any code in the meantime. As you imply that this worked with exactly the browserify version you are using now, I'm going to go out on a limb and guess it's either a transform misfiring or a mistake in your code.
Try finding all the require
calls in code you recently modified (since the last known good version). If you use source control (who am I kidding: I'm thinking of git) this should be fairly trivial. If you're not using source control, you should be using source control.
If you're finding any new require
calls that pass something other than a string to require
(e.g. multiple arguments or even variables), you may have found your culprit.
If that didn't help, see if you have any transforms that may end up in require
calls being modified. This could be nearly everything.
If that didn't do any good either, try updating everything to the latest version. Besides possibly causing problems if you use really outdated versions of anything, it may fix your problem. Try updating to the latest minor release (for versions >= 1.0) or bugfix release (for versions < 1.0) if you want to avoid compatibility problems.
If that still doesn't help, please post more details and make sure you understand the exact differences between the code that worked "a couple of days ago" and the code you have now.