2

I'm using browserify-shim and having issues with things loading properly. I get the following error, which hardly makes sense since I'm using aliases.

Cannot find module '/Users/knownasilya/sandbox/ember-leaflet-scaffold/bower_components/jquery/dist/jquery.js'

I'm unsure how -x works exactly, I tried the alias, I tried the bundle path, and I tried the paths for the libraries, but none work.

When I tried using the url of the libs bundle:

browserify -r jquery -r handlebars -r ember -r ember-data -r collapse -r leaflet > public/scripts/libs.js
browserify -x ./public/scripts/libs.js ./client/.index.js > ./public/scripts/application.js

I get Cannot find module 'handlebars' error. But if I add all of the libs (with -x for each with aliases) I get Cannot find module 'QGCdlF'.

I can't find any good examples, and maybe this is an issue with Ember itself, and how it requires jquery and handlebars.. The only time it works is when I do "depends": ["jquery:jQuery", "handlebars:Handlebars"].. so make them globals..

knownasilya
  • 5,998
  • 4
  • 36
  • 59
  • Looks like we're having a similar issue, although via Gulp instead of command-line: http://stackoverflow.com/questions/23121980/cannot-find-module-jquery-handling-globals-for-jquery-and-angularjs-in-bro – Ryan Kimber Apr 16 '14 at 23:30
  • Have you checked out this issue? https://github.com/thlorenz/browserify-shim/issues/30 – Ryan Kimber Apr 16 '14 at 23:31
  • @RyanKimber no I haven't, thanks, I'll have a look. I've also tried it with gulp. – knownasilya Apr 17 '14 at 13:09

0 Answers0