gingerhendrix / broccoli-browserify

Browserify plugin for Broccoli
9 stars 23 forks source link

I can't get this to work. #1

Closed doughsay closed 10 years ago

doughsay commented 10 years ago

I get very cryptic unhelpful errors when I try to use this.

My extremely simple Brocfile.js is:

module.exports = function (broccoli) {
  var browserify = require('broccoli-browserify')
    , sourceTree = broccoli.makeTree('src')

  sourceTree = browserify(sourceTree, {entries: 'client.js'})

  return sourceTree
}

And the errors I get are:

Error: Cannot find module 'c' from 'src'
    at /Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:44:17
    at process (/Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:110:43)
    at /Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:119:21
    at load (/Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:54:43)
    at /Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:60:22
    at /Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:16:47
    at Object.oncomplete (fs.js:97:15)

The odd and cryptic part of it is that the "module" letter (in this case c) is sometimes different, and the "from" part is always the name as the sourceTree directory name. Am I just using this wrong?

doughsay commented 10 years ago

Please disregard, entries must be an array.