Fluidbox icon indicating copy to clipboard operation
Fluidbox copied to clipboard

Npm + browserify (can't find variable jQuery)

Open pygeek opened this issue 9 years ago • 5 comments

It seems like your plungin isn't browserify compatible. I'm installing using the latest version of npm and browserify, but it seems like your plugin is depending on jQuery being included separately in the head.

pygeek avatar Sep 02 '15 18:09 pygeek

I have no experience working with Browserify. Could you recommend how this can be rectified?

terrymun avatar Sep 21 '15 11:09 terrymun

I had the same issue here. You could use browserify-shim meanwhile. Works fine.

gwendoux avatar Jan 22 '16 10:01 gwendoux

@gwendoux i was trying it with browserify-shim but I am still getting the jQuery missing error. Can you tell me how you solved it? I am not so familiar with browserify-shim, here is my code of package.json

  "browserify-shim": {
    "fluidbox": {
      "depends": [
        "jquery:jQuery"
      ]
    }
  }

mmintel avatar Aug 16 '16 08:08 mmintel

@mmintel Do you include jquery in your package.json ? When you open the result of your browserify operation, jquery is it included ?

gwendoux avatar Aug 17 '16 10:08 gwendoux

@gwendoux yes jquery is included in my dependencies, it also works with browserify.

  "dependencies": {
    "fluidbox": "^2.0.0",
    "jquery": "^3.1.0"
  },
  "browserify-shim": {
    "fluidbox": {
      "depends": [
        "jquery:jQuery"
      ]
    }
  }

mmintel avatar Aug 17 '16 11:08 mmintel