Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[npm] Stupid question: Why is npm update react-native not updating? #1543

Closed
jaygarcia opened this issue Jun 7, 2015 · 8 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jaygarcia
Copy link
Contributor

Wasn't 0.6.0 released a few days ago? My project just won't update.

Someone please help me understand what i'm doing wrong here.

jgarcia-15in:KGMP jgarcia$ npm update react-native
npm WARN engine stacktrace-parser@0.1.1: wanted: {"node":"~0.10"} (current: {"node":"0.12.0","npm":"2.5.1"})

> ws@0.4.31 install /www/ios/KeyGenMusicPlayer/KGMP/node_modules/react-native/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
react-native@0.4.4 node_modules/react-native
├── absolute-path@0.0.0
├── stacktrace-parser@0.1.1
├── graceful-fs@3.0.8
├── react-timer-mixin@0.13.1
├── underscore@1.7.0
├── image-size@0.3.5
├── debug@2.1.3 (ms@0.7.0)
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.0.1, supports-color@1.3.1, strip-ansi@2.0.1, has-ansi@1.0.3)
├── yargs@1.3.2
├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
├── worker-farm@1.3.1 (xtend@4.0.0, errno@0.1.2)
├── source-map@0.1.31 (amdefine@0.1.0)
├── promise@7.0.1 (asap@2.0.3)
├── bluebird@2.9.27
├── sane@1.1.2 (watch@0.10.0, minimist@1.1.1, exec-sh@0.2.0, minimatch@0.2.14, fb-watchman@0.0.0, walker@1.0.7)
├── rebound@0.0.12
├── ws@0.4.31 (tinycolor@0.0.1, options@0.0.6, commander@0.6.1, nan@0.3.2)
├── connect@2.8.3 (methods@0.0.1, uid2@0.0.2, fresh@0.1.0, pause@0.0.1, cookie-signature@1.0.1, qs@0.6.5, bytes@0.2.0, buffer-crc32@0.2.1, cookie@0.1.0, send@0.1.2, formidable@1.0.14)
├── uglify-js@2.4.23 (uglify-to-browserify@1.0.2, async@0.2.10, yargs@3.5.4, source-map@0.1.34)
├── jstransform@11.0.1 (object-assign@2.1.1, base62@1.1.0, source-map@0.4.2, esprima-fb@15001.1.0-dev-harmony-fb, commoner@0.10.1)
├── module-deps@3.5.6 (inherits@2.0.1, shallow-copy@0.0.1, minimist@0.2.0, parents@1.0.1, subarg@0.0.1, stream-combiner2@1.0.2, readable-stream@1.0.33, through2@0.4.2, duplexer2@0.0.2, resolve@0.7.4, concat-stream@1.4.8, JSONStream@0.7.4, browser-resolve@1.9.0, detective@3.1.0)
├── react-tools@0.13.2 (jstransform@10.1.0, commoner@0.10.1)
└── joi@5.1.0 (topo@1.0.2, isemail@1.1.1, hoek@2.14.0, moment@2.10.3)

Then checking:

jgarcia-15in:KGMP jgarcia$ npm list | grep -i react
├─┬ react-native@0.4.4
│ ├── react-timer-mixin@0.13.1
│ ├─┬ react-tools@0.13.2
@christopherdro
Copy link
Contributor

The latest stable release is 0.5.0.

Did you make sure to update the version inside of package.json?

Afterwards, you can just run npm update in the your project directory.

@brentvatne
Copy link
Collaborator

@jaygarcia - I'd recommend updating the version in package.json then just running npm i again

@brentvatne brentvatne changed the title Stupid question: Why is npm update react-native not updating? [npm] Stupid question: Why is npm update react-native not updating? Jun 7, 2015
@jaygarcia
Copy link
Contributor Author

@christopherdro @brentvatne that worked. It feels pretty stupid to have to manually update package.json, but it works. =)

Thanks.

@ivesy85
Copy link

ivesy85 commented Jun 29, 2015

I cant for the life of me get this to work. I navigate to my project folder and change version number in package.json from 0.4.4 to 0.6.0 and then do npm update but it just changes it back to 0.4.4

@jawadrehman
Copy link

this might help #1606

@joshuapinter
Copy link
Contributor

@jaygarcia I agree. This requires you to know that there is a more recent version, which version number that is, update the package.json and then finally go npm update.

@joshuapinter
Copy link
Contributor

Don't forget to run react-native upgrade after npm update so your template files are updated, if necessary.

@joshuapinter
Copy link
Contributor

FYI, my buddy EKryski and I were hanging out and he mentioned that NPM has a weird behaviour when the major version is 0.

Basically, when the major version of a package is 0, like React Native is (currently 0.21.0), then the caret won't do what it typically does when a package's major version is >= 1. It simply ignores the caret and only cares about the specific version you have entered.

So, for packages with a major release of 0 you have a few options, including using >= like:

"react-native": ">=0.21.0"

And that will update to the latest version using npm update.

Or you can manually specify the exact version you want.

Also, a great little npm command is npm outdated which shows new versions of your packages:
screenshot 2016-03-11 11 16 59

The more you know!
image

@facebook facebook locked as resolved and limited conversation to collaborators Jun 8, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants