Open moll opened 10 years ago
Hey,
Trying out Gluejs in a real world context here, but having trouble understanding how it's supposed to be used.
Invoking it with, amongst other options, with:
--basepath app/javascripts --include app/javascripts/node_modules/underscore/index.js --include app/javascripts/node_modules/backbone/index.js
Doing require("underscore") works from my own code, but when doing require("backbone"), it fails with Uncaught Error: failed to require "underscore" from index.js because of Backbone's attempt to load Underscore itself.
require("underscore")
require("backbone")
Uncaught Error: failed to require "underscore" from index.js
How should this be handled?
This seems to come from the difference on how Node resolves dependencies (searching ancestor directories) and how Glue doesn't.
Hey,
Trying out Gluejs in a real world context here, but having trouble understanding how it's supposed to be used.
Invoking it with, amongst other options, with:
Doing
require("underscore")
works from my own code, but when doingrequire("backbone")
, it fails withUncaught Error: failed to require "underscore" from index.js
because of Backbone's attempt to load Underscore itself.How should this be handled?