56

I see from here https://github.com/jquery/jquery-ui that jquery-ui's latest release is 1.11.4. However, when I use "npm install jquery-ui", it's only 1.10.3. I checked this version in node_modules/jquery-ui/jquery-ui.js.

Is there any way for me to install the latest version?

Jonathan.Brink
  • 23,757
  • 20
  • 73
  • 115
Bomin
  • 1,619
  • 5
  • 24
  • 39
  • Check [this](https://docs.npmjs.com/cli/install), how to use version! – Deepak Biswal Dec 11 '15 at 08:29
  • I tried `npm install jquery-ui@latest`, but I still have 1.10.3 – Bomin Dec 11 '15 at 08:38
  • Sorry, I just realized I'm asking a stupid question. Node is using a different repository... not git... I'm not sure how I should deal this question now. – Bomin Dec 11 '15 at 08:48
  • 4
    As per jquery-ui website, 1.12 is the first version officially released to npm: https://jqueryui.com/upgrade-guide/1.12/#official-package-on-npm If you are willing to skip 1.11.* then you can use this package: https://www.npmjs.com/package/jquery-ui – Aditya Mehta Oct 04 '16 at 04:50

4 Answers4

135

jQuery-ui specifically needs to be build after installation. To avoid this, use npm install jquery-ui-dist

schad
  • 1,484
  • 1
  • 10
  • 8
17

T J gave the right answer, but it is a bit short / too generic.

The GitHub project is at https://github.com/jquery/jquery-ui/

So the real command would be npm install github:jquery/jquery-ui (you can even skip github: as npm defaults to it).

But this would bring you the latest, unstable version (around 1.12 at time of writing), and it didn't even work when I tried.

So it is better to fetch a tagged version:

npm install github:jquery/jquery-ui#1.11.4

Generic note: AFAIK, if the project hasn't a package.json file, this kind of install can still fail.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
PhiLho
  • 40,535
  • 6
  • 96
  • 134
  • This worked for me, getting and saving 1.12.0. Is there a way of checking if npm's version is outdated from the actual git source? – Ben Sewards Jul 10 '16 at 23:04
  • 1
    @BenSewards In general, I go to the NPM registry to see what version is listed (beware: several NPM entries can refer to the same GitHub project! I saw that with Angular UI Bootstrap, for example). Then I go to the GitHub project (referenced from the NPM page) and see the released versions (tagged). Some projects have no released version, alas. – PhiLho Jul 11 '16 at 14:45
  • 1
    @BenSewards: That's easy. npm install $packagename. As long as you leave off the "-S", it doesn't do any saving, and should output something like: "└── jquery-ui-dist@1.12.1" – HoldOffHunger Oct 26 '17 at 15:58
6

Here is the current latest version (1.11.4), same package that bower is using, including all themes.

npm install github:components/jqueryui#1.11.4

Giannis
  • 486
  • 6
  • 8
0

You can install it like

npm install github:mygithubuser/myproject

as mentioned in the install documentation

T J
  • 42,762
  • 13
  • 83
  • 138