npmが古かったので更新したときのφ(..)メモメモ


react-toolsを入れようとして久しぶりにinstallにnpmを使ってみたら

```
takayuki$ sudo npm install -g react-tools
Password:
npm http GET https://registry.npmjs.org/react-tools
npm http 200 https://registry.npmjs.org/react-tools
npm http GET https://registry.npmjs.org/react-tools/-/react-tools-0.13.3.tgz
npm http 200 https://registry.npmjs.org/react-tools/-/react-tools-0.13.3.tgz
npm http GET https://registry.npmjs.org/commoner
npm http GET https://registry.npmjs.org/jstransform
npm http 200 https://registry.npmjs.org/jstransform
npm ERR! Error: No compatible version found: jstransform@'^10.1.0'
npm ERR! Valid install targets:
npm ERR! ["1.0.0","1.0.1","2.0.1","2.0.2","2.0.3","3.0.0","4.0.0","4.0.1","5.0.0","6.0.0","6.0.1","6.1.0","6.2.0","6.3.0","6.3.2","7.0.0","8.0.0","8.1.0","8.2.0","9.0.0","9.1.0","9.1.1","10.0.0","10.0.1","10.1.0","11.0.0","11.0.1","11.0.2"]
npm ERR!     at installTargetsError (/Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/lib/cache.js:685:10)
npm ERR!     at /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/lib/cache.js:607:10
npm ERR!     at saved (/Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 14.3.0
npm ERR! command "/Users/takayuki/.nvm/v0.10.6/bin/node" "/Users/
takayuki/.nvm/v0.10.6/bin/npm" "install" "-g" "react-tools"
npm ERR! cwd /Users/takayuki/work/react/getstarted
npm ERR! node -v v0.10.6
npm ERR! npm -v 1.2.18
npm http 200 https://registry.npmjs.org/commoner
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/takayuki/work/react/getstarted/npm-debug.log
npm ERR! not ok code 0
```

バージョンを見ると、

```
takayuki$ npm -v
1.2.18
```

だいぶ古い。

npm更新は、npmでnpm自身をinstallするらしい...!

```
takayuki$ sudo npm install -g npm
Password:
npm http GET https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-2.12.0.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-2.12.0.tgz
/Users/takayuki/.nvm/v0.10.6/bin/npm -> /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/bin/npm-cli.js
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/async-some requires dezalgo@'^1.0.2' but will load
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/dezalgo,
npm WARN unmet dependency which is version 1.0.3
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/columnify requires strip-ansi@'^2.0.1' but will load
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/strip-ansi,
npm WARN unmet dependency which is version 2.0.1
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/fs-vacuum requires graceful-fs@'^3.0.2' but will load
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/graceful-fs,
npm WARN unmet dependency which is version 3.0.8
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/fs-vacuum requires path-is-inside@'^1.0.1' but will load
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/path-is-inside,
npm WARN unmet dependency which is version 1.0.1
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/fs-vacuum requires rimraf@'^2.2.8' but will load
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/rimraf,
npm WARN unmet dependency which is version 2.4.0
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/fs-write-stream-atomic requires graceful-fs@'^3.0.2' but will load
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/graceful-fs,
npm WARN unmet dependency which is version 3.0.8
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/glob requires inflight@'^1.0.4' but will load
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/inflight,
npm WARN unmet dependency which is version 1.0.4
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_modules/npm/node_modules/glob requires minimatch@'^2.0.1' but will load
npm WARN unmet dependency /Users/takayuki/.nvm/v0.10.6/lib/node_mo

```

大量のwarning...これはいったい...

いったんバージョンを確認。

```
npm -version
2.12.0
```

上がってる。

```
takayuki$ sudo npm install -g react-tools
^R
/Users/takayuki/.nvm/v0.10.6/bin/jsx -> /Users/takayuki/.nvm/v0.10.6/lib/node_modules/react-tools/bin/jsx
react-tools@0.13.3 /Users/takayuki/.nvm/v0.10.6/lib/node_modules/react-tools
├── jstransform@10.1.0 (base62@0.1.1, esprima-fb@13001.1001.0-dev-harmony-fb, source-map@0.1.31)
└── commoner@0.10.3 (private@0.1.6, commander@2.5.1, graceful-fs@3.0.8, install@0.1.8, q@1.1.2, iconv-lite@0.4.10, mkdirp@0.5.1, glob@4.2.2, recast@0.10.13)
```

入った。