Browserify Fails to Run - Cannot find shred.js #61

kdeenanauth opened this Issue Nov 27, 2013 · 5 comments


None yet
3 participants

I'm having problems getting Browserify to bundle Shred. See below (on Windows 7) after npm install:

D:\shred>cake bundle
path.existsSync is now called `fs.existsSync`.

            throw new Error('Cannot find module ' + JSON.stringify(mfile)
Error: Cannot find module "D:\\shred\\lib\\shred.js" from directory "D:\\shred\\
  at EventEmitter.Wrap.require (D:\shred\node_modules\browserify\lib\wrap.js:352
  at include (D:\shred\node_modules\browserify\lib\wrap.js:312:14)
  at Array.forEach (native)
  at EventEmitter.Wrap.requireMultiple (D:\shred\node_modules\browserify\lib\wra
  at EventEmitter.Wrap.require (D:\shred\node_modules\browserify\lib\wrap.js:324
  at module.exports (D:\shred\node_modules\browserify\index.js:117:7)
  at Object.TaskHelpers.makeBundle (D:\shred\Cakefile:39:14, <js>:64:16)
  at Object.action (D:\shred\Cakefile:10:3, <js>:21:24)
  at helpers.extend.invoke (C:\Users\kevin.deenanauth\AppData\Roaming\npm\node_m
  at (C:\Users\kevin.deenanauth\AppData\Roaming\npm\node_modu
  at Object.<anonymous> (C:\Users\kevin.deenanauth\AppData\Roaming\npm\node_modu
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:901:3


I've validated shred.js exists in d:\shred\lib\



automatthew commented Nov 27, 2013

You'll probably find a hard-coded forward-slash somewhere in the source.

Changing the cakefile to be "lib/shred.js" instead of "./lib/shred.js" also leads to the same error. Other permutations (using \ instead) fail too.

It looks like the issue is that shred uses an old version of browserify which uses an old version of resolve (pre 0.2.0). I'm going to try using a newer version of browserify and see how it goes.

I've failed to find a version of browserify that works.

It seems in the latest versions of browserify, they've replaced using the resolve module with their own implementation. While the latest browserify runs with no errors, it also produces no output when ran against Shred. :(


dyoder commented May 17, 2014

NG (1.0.x) is a rewrite. This problem should be resolved as part of #71, #72. Closing as superseded by those issues.

@dyoder dyoder closed this May 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment