hsume2 / browserify-rails

Deprecated https://github.com/browserify-rails/browserify-rails
MIT License
57 stars 11 forks source link

Cannot find module error, due to missing semicolon #34

Closed rymohr closed 10 years ago

rymohr commented 10 years ago

Took me a while to track this one down and still don't have a great grasp on it.

I was getting the error Uncaught Error: Cannot find module 'function () {}' and after digging around noticed it looked like there were two functions calls stacked back to back. Throwing a trailing semicolon onto the end of the browserify output fixed things:

def browserify
  run_browserify(options) + ";"
end

I'll try to reduce it to a test case but wanted to throw this out there in case anyone else is running into the same issue. These are coffeescript files so I'm not sure if it's a browerify or coffeeify issue.

rymohr commented 10 years ago

Continued at https://github.com/browserify-rails/browserify-rails/issues/15