jQuery duplicated by bootbox when require("bootbox") is used. #524

LordSyntax opened this Issue Jul 12, 2016 · 4 comments


None yet

4 participants

LordSyntax commented Jul 12, 2016 edited

I am using Bootbox under Node:

  "dependencies": {
    "bootbox": "^4.4.0",

My project is an Ampersand Single Page App, which uses Moonboots.

Moonboots defines the non-common js libraries, which causes them to be written out at the top of the compiled/unified javascript file which is distributed to the client.

libraries: [
            __dirname + '/node_modules/jQuery/dist/jquery.js',
            __dirname + '/node_modules/bootstrap/dist/js/bootstrap.js'

The problem that I am seeing is that when I wish to use bootbox in my ampersand-view pages using require("bootbox"), it causes the jQuery library to be written a second time in the javascript file (which causes problems with jQuery defines, making bootbox think bootstrap isn't installed).

If I remove the require("bootbox") call, then jQuery is only included once (as expected).

I assume this has something to do with module.exports = factory(require("jquery")); in bootbox.js, but truthfully am not sure, because I am not an advanced Node and Bootstrap developer.


Possibly related to the following issues, given their proximity in bootbox.js

// @see https://github.com/makeusabrew/bootbox/issues/180
// @see https://github.com/makeusabrew/bootbox/issues/186
tiesont commented Jul 12, 2016

@LordSyntax You can reference another issue simply by using the issue number, preceded by a pound sign, like so: #180


Should be fixed by the merge of #436 - feel free to test against master, or otherwise will make it into 4.4.1


When will v4.4.1 be released? It seems like there's a few important bugfixes waiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment