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

Closed
kdeenanauth opened this Issue Nov 27, 2013 · 5 comments

Comments

Projects
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`.

D:\shred\node_modules\browserify\lib\wrap.js:352
            throw new Error('Cannot find module ' + JSON.stringify(mfile)
                  ^
Error: Cannot find module "D:\\shred\\lib\\shred.js" from directory "D:\\shred\\
lib"
  at EventEmitter.Wrap.require (D:\shred\node_modules\browserify\lib\wrap.js:352
:19)
  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
p.js:290:16)
  at EventEmitter.Wrap.require (D:\shred\node_modules\browserify\lib\wrap.js:324
:21)
  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
odules\coffee-script\lib\coffee-script\cake.js:44:26)
  at Object.exports.run (C:\Users\kevin.deenanauth\AppData\Roaming\npm\node_modu
les\coffee-script\lib\coffee-script\cake.js:70:21)
  at Object.<anonymous> (C:\Users\kevin.deenanauth\AppData\Roaming\npm\node_modu
les\coffee-script\bin\cake:7:38)
  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


D:\shred>

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

Thanks!

Owner

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. :(

Owner

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