Required Gatsby v4 an outdated version? - npm

How can we downgrade Gatsby version from 5.5.0 to 4.0.0 ?
There is nothing find fit for this to get v4 from v5.

Related

Install elm package with a specifying version?

I am doing an Elm's tutorial. By that, the package elm/http is version 1.0.0. But when I installed, the current version is 2.0.0. And I don't how to install the package with a specifying version(here is elm/http 1.0.0).
I tried to modify the version of elm/http package to 1.0.0 in elm.json and then re-install with elm install elm/http but It's not working.
In JavaScript, I use npm i thePackage#1.0.0 to do that.
Many thanks!
In Elm 0.19, elm install <package> just updates your elm.json file, there is no local installation of the packages. So updating the field in elm.json to 1.0.0 should be all that you need to do. elm make will see that and use the right package.

tensorflow 1.1 version download on Windows

I'd like to download 1.1.0 version tensorflow.
But they don't support that version with pip anymore.
How can I download it?
or is there any helpful things that can help to fix codes from low version to latest version?
Try to use
pip install tensorflow==<version>
If it doesn't work, please try the below
In https://pypi.org/project/tensorflow/1.1.0/ download .whl of the version you need and install it using pip.

How to update React npm package in Visual Studio 2017

I created a dotnet core 2.0 app using the React+ Redux template in VS2017. The template comes with react v15.6.1 by default, and I would like to upgrade this to v16.
I first tried going into the npm packages folder under the project dependencies list, and right clicking on react > Update Package. The update said it was completed but this however did not actually change my react version.
I then went into the package.json file and started typing in the new version and 16.2.0 came up as an intellisense option, but when I saved the file the package again did not update.
Has anyone figured out how to update the React version that comes with the template, there are a number of improvements in v16 I would like to make use of.
Here we go
After opening VS2017 go to
1) Tools -> NuGet Package Manager -> Package Manager Console
You will see Package Manager Console at the bottom pointing as PM>
2) Go to your root directory of main projects package.json file.
eg.
PM> cd D:\Myproject
3) Once you are in main directory type command below.
PM> ncu -u
After hitting this command, you will get notifications as below.
Using D:\Myproject\package.json
#types/history 4.6.0 → 4.6.2
#types/react 15.0.35 → 16.3.8
#types/react-dom 15.5.1 → 16.0.5
#types/react-hot-loader 3.0.3 → 3.0.6
#types/react-redux 4.4.45 → 5.0.16
#types/react-router 4.0.12 → 4.0.23
#types/react-router-dom 4.0.5 → 4.2.6
#types/react-router-redux 5.0.3 → 5.0.13
#types/webpack 2.2.15 → 4.1.3
#types/webpack-env 1.13.0 → 1.13.5
awesome-typescript-loader 3.2.1 → 5.0.0
bootstrap 3.3.7 → 4.1.0
css-loader 0.28.4 → 0.28.11
event-source-polyfill 0.0.9 → 0.0.12
extract-text-webpack-plugin 2.1.2 → 3.0.2
file-loader 0.11.2 → 1.1.11
history 4.6.3 → 4.7.2
jquery 3.2.1 → 3.3.1
react 15.6.1 → 16.3.1
react-dom 15.6.1 → 16.3.1
react-hot-loader 3.0.0-beta.7 → 4.0.1
react-redux 5.0.5 → 5.0.7
react-router-dom 4.1.1 → 4.2.2
redux 3.7.1 → 3.7.2
style-loader 0.18.2 → 0.20.3
typescript 2.4.1 → 2.8.1
url-loader 0.5.9 → 1.0.1
webpack 2.5.1 → 4.5.0
webpack-hot-middleware 2.18.2 → 2.22.0
webpack-merge 4.1.0 → 4.1.2
aspnet-webpack ^2.0.1 → ^2.0.3
Upgraded D:\Myproject\package.json
If you still getting older versions
Then hit this commands
npm install -g npm-check-updates
ncu -u
Ref
You have to edit package.json and change the version of react, save THEN trigger the update.

npm update is not honoring the results of npm outdated

I ran npm outdated on a project - it showed that there were several outdated packages. So I ran npm update - it updated a few packages but not all. If I run npm outdated again it still shows the remaining packages that are outdated:
Package Current Wanted Latest
babel-loader 7.1.1 7.1.1 7.1.2
babel-runtime 6.23.0 6.23.0 6.26.0
chalk 2.0.1 2.0.1 2.1.0
css-loader 0.28.4 0.28.4 0.28.5
eslint 4.2.0 4.2.0 4.5.0
eslint-plugin-react 7.1.0 7.1.0 7.2.1
fs-extra 4.0.0 4.0.0 4.0.1
html-webpack-plugin 2.29.0 2.29.0 2.30.1
material-ui 1.0.0-beta.5 1.0.0-beta.5 0.19.0
postcss-flexbugs-fixes 3.0.0 3.0.0 3.2.0
react-stripe-elements 0.0.2 0.0.2 0.0.7
webpack 3.3.0 3.3.0 3.5.5
webpack-dev-server 2.5.1 2.5.1 2.7.1
webpack-manifest-plugin 1.1.2 1.1.2 1.3.1
If I try to run npm update again, it does nothing!
Why are the two commands telling me different things?
Thanks in advance.
If you run npm update and some of the packages defined in package.json have their version pinned, it will not update. That is why you see three columns when you run npm outdated. The current installed version, the latest version that matches what is defined in your package.json, and finally, the actual latest version.

What does 'npm outdated --depth=0 ' mean to do as ask action when seeing differences?

When running the command npm outdated --depth=0 I see the following:
Package Current Wanted Latest Location
cordova 5.4.1 5.4.1 6.0.0 cordova
grunt-angular-templates 0.5.9 0.5.9 1.0.3 grunt-angular-templates
grunt-autoprefixer 0.4.2 0.4.2 3.0.4 grunt-autoprefixer
grunt-bump 0.3.4 0.3.4 0.7.0 grunt-bump
...
What does those differences between 'Current', 'Wanted' and 'Latest' mean to me? Respectively what am I supposed to do in case?
Current: Current version of the packages installed.
Wanted: The maximum version of the package that satisfies the semver range specified in package.json. If there's no available semver range (i.e. you're running npm outdated --global, or the package isn't included in package.json), then wanted shows the currently-installed version.
Latest: The version of the package tagged as latest in the registry. Running npm publish with no special configuration will publish the package with a dist-tag of latest. This may or may not be the maximum version of the package, or the most-recently published version of the package, depending on how the package's developer manages the latest dist-tag.
Reference: https://docs.npmjs.com/cli/outdated