Closed Shurlow closed 9 years ago
@Shurlow What did you do to solve this? Currently getting this error as well.
@chippawah I ended up switching to webpack actually
But this is a snippet of my old gulp config that was working for me:
var props = {
entries: [scriptsDir + '/main.js'],
extensions: ['.js', '.jsx'],
debug : true,
cache: {},
packageCache: {},
transform: [babelify, looseEnvify, reactify]
};
var bundler = watchify(browserify(props));
FWIW I started getting this error after a fresh npm install
, and doing separate follow-up npm install browserify
and npm install watchify
fixed it. I did both before I tried again so it might have been one or the other or both that fixed it.
I followed @amalgamatedio's approach and the issue was fixed after npm install browserify
(didn't need to separately install watchify).
npm install browserify
did it for me too 👍
The fix for me was to ensure I was using this package as a plugin
and not as a transform
.
Watchify is throwing this error when using with gulp and browserify.
Error occurs at line 14
var cache = b._options.cache;
I am using watchify identical to the example in the README does. This is all the code in my gulpfile as of now..
I get the same error when passing the cache option directly to browserify as well.
Thoughts?