Using "npm install" to install jquery-ui - jquery-ui

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?

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

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.

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

You can install it like
npm install github:mygithubuser/myproject
as mentioned in the install documentation

Related

How to upgrade react-leaflet from v.2.8 to v.3

I'm using react-leaflet v.2.8 in my project. I want to upgrade the react-leaflet to v.3. But how? When I write "npm i react-leaflet", it installed only react-leaflet v.2.8.
One way:
npm uninstall react-leaflet
npm install react-leaflet
Another way:
Go to your package.json, and change whatever version number react-leaflet has to the latest one that is listed on npm. It should then look like this in the package.json:
"react-leaflet": "^3.2.0"
Then run npm install react-leaflet
Keep in mind there are lots of breaking changes from version 2 to version 3, so be prepared to update your codebase.

vips/vips8 file not found #include <vips/vips8> in Ionic cordova in IOS

I found an error in sharp.
After that, I found a blog in which they ask to delete sharp from the node module and run sudo npm i.
I have gone through GitHub and write minipass - 2.7.0
After that, I got a new error in
vips/vips8 file not found #include <vips/vips8>
I'm using Ionic with Angular on Macbook
I use commands which is
1.sudo npm install
2.sudo npm i gulp-sass -ES --unsafe-perm=true
3.sudo ionic cordova platform add ios
I very recently ran into a similar issue after making some changes to a project's package.json on my Mac (not an Angular or Cordova project).
I came across this GitHub issue for the sharp package which mentioned you may need to update the globally-installed version of libvips: https://github.com/lovell/sharp/issues/1148
In my case, since I use Homebrew but had not directly installed this package previously, I was able to resolve by running brew install vips and then re-running npm install. Note that it has a lot of dependencies so installation may take some time.
Edit: if that doesn't work, you may need to try a fresh install by removing node_modules, then re-running npm i.
This might be not applicable to everyone, but remove package-lock.json and node_modules directory first and then try npm install again. (I also added the minipass in my package.json, by the way)
In my case, I had encountered the same error, but I could solve it by doing the above.

Cannot find module 'babel-eslint' (both standard and babel-eslint already installed locally)

What version of standard?
12.0.1
What operating system, Node.js, and npm version?
Windows 10,
Node v10.15.1,
NPM v.6.8.0
What did you expect to happen?
I install both standard and babel-eslint on devDependencies
(locally).
I run standard --parser babel-eslint
I get the standard use babel-eslint parser to recognize babel code style and not stating
it as style error
What actually happened?
I install both standard and babel-eslint on devDependencies (locally).
I run standard --parser babel-eslint
I get error: Cannot find module 'babel-eslint'
I read from previous issues 85 1167, it should be fixed when they are installed on the same level. But it does not happen on mine.
I have tried to put config below on package.json:
"standard": {
"parser": "babel-eslint"
}
But it does not resolve the issue.
Hi this is an old question but for who passes here in the future, those answers didn't work for me, but this one did:
npm install babel-eslint --save-dev
Try
$yarn add standard babel-eslint
I solved this by doing:
npm install -g babel-eslint

Homebrew install the old version of flow

I cd to my react-native project directory, and run flow, it prompts me Launching Flow server for /Users/... Wrong version of Flow. The config specifies version ^0.32.0 but this is version 0.33.0. How do I install the previous version flow with Homebrew?
If you run brew info flow in the console, you'll see a line similar to the following:
flow: stable 0.33.0 (bottled), HEAD
This means that the person managing the flow homebrew formula is removing old versions as the version gets updated, so it's impossible for you to access any old versions, barring performing some behind the scenes business I'm unaware of.
Luckily, there's a solution for you. I assume you're using npm, in which case you can try the following:
npm install flow-bin#0.32 -g
This will install a binary wrapper for flow, packaged through npm, in which previous versions are all available. By installing globally, you can use the flow commands in the command line.
If you don't want to install globally, for fear of conflicting with other projects, etc., you can still install locally and use flow:
npm install flow-bin#0.32
Now, add the following to package.json:
"scripts": {
...
"flow": "flow ."
},
And now, you'll be able to run flow on your project with the command:
npm run flow

Managing bower dependencies with ionic

After starting with a new ionic app, I can see at bower.json that comes with ionic is in devdependencies. Why is it a devdependency and not a normal dependency?
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.0.0-rc.0"
},
Thanks, I feel confused right now
having devDependencies gives you the opportunity to simplify the steps that drive you from the source files (a git clone of the project) to the production ready app
when you don't need to make changes and (develop) the application, you could just run
bower install --production
or
npm install --production
they work the same
bower install options
-F, --force-latest: Force latest version on conflict
-p, --production: Do not install project devDependencies
-S, --save: Save installed packages into the project’s bower.json dependencies
-D, --save-dev: Save installed packages into the project’s bower.json devDependencies
-E, --save-exact: Configure installed packages with an exact version rather than semver
bower documentation
npm install options
By default, npm install will install all modules listed as
dependencies. With the --production flag (or when the NODE_ENV
environment variable is set to production), npm will not install
modules listed in devDependencies.
npm documentation
This way you take less time to ship the app and don't waste bandwidth downloading stuff you won't need.
Given that, to me, the choice of listing ionic as devDependecy is a poor one: it implies that I could take advantage of this choice to get ready the app for execution this way:
git clone my-project
git cd my-project
npm install --production # ionic not installed here
ionic state restore
ionic build ios
Now, if you ignore the content of /lib folder in your sources, this should not work, and if it works because the ionic-cli does some more checks to save your ass, I think this is unclear.
From what I understand, dependencies are required to run, and devDependencies are only for development, like minification, unit tests, etc.
Both will install when you do npm install but only dependencies will install when you do npm install $package, unless you add the --dev option

Resources