安装react-native

时间:2018-04-02 02:49:12

标签: react-native npm npm-install

我的npm install昨天工作正常,但现在由于某种原因我不明白而挂起。

我的package.json

{
 "name": "Vanitee",
 "version": "0.0.1",
 "private": true,
 "scripts": {
 "start": "node node_modules/react-native/local-cli/cli.js start",
 "test": "jest",
 "flow": "flow --show-all-errors"
  },
"dependencies": {
 "@tradle/react-native-http": "^2.0.0",
 "assert": "^1.4.1",
 "babel-plugin-transform-remove-console": "^6.9.0",
 "browserify-zlib": "^0.1.4",
 "console-browserify": "^1.1.0",
 "constants-browserify": "^1.0.0",
 "dns.js": "^1.0.1",
 "domain-browser": "^1.2.0",
 "events": "^1.1.1",
 "https-browserify": "0.0.1",
 "mobx": "^3.6.2",
 "mobx-react": "^4.4.3",
 "moment": "^2.22.0",
 "path-browserify": "0.0.0",
 "process": "^0.11.10",
 "querystring-es3": "^0.2.1",
 "react": "^16.0.0",
 "react-native": "^0.50.4",
 "react-native-crypto": "^2.1.2",
 "react-native-dropdownalert": "^3.4.0",
 "react-native-easy-toast": "^1.1.0",
 "react-native-htmlview": "^0.12.1",
 "react-native-http": "github:tradle/react-native-http#834492d",
 "react-native-image-progress": "^1.0.1",
 "react-native-keyboard-spacer": "^0.4.1",
 "react-native-level-fs": "^3.0.0",
 "react-native-lightbox": "^0.7.0",
 "react-native-maps": "^0.19.0",
 "react-native-modal": "^4.1.1",
 "react-native-os": "^1.1.0",
 "react-native-randombytes": "^3.0.0",
 "react-native-star-rating": "^1.0.8",
 "react-native-styled-image-progress": "0.0.2",
 "react-native-swiper": "^1.5.13",
 "react-native-tcp": "^3.3.0",
 "react-native-timer": "^1.3.1",
 "react-native-udp": "^2.3.1",
 "react-native-vector-icons": "^4.5.0",
 "react-navigation": "^1.0.0-beta.27",
 "readable-stream": "^1.0.33",
 "stream-browserify": "^1.0.0",
 "timers-browserify": "^1.4.2",
 "tty-browserify": "0.0.0",
 "url": "^0.10.3",
 "util": "^0.10.3",
 "vm-browserify": "0.0.4"
},
"devDependencies": {
 "babel-jest": "21.2.0",
 "babel-plugin-transform-decorators-legacy": "^1.3.4",
 "babel-preset-react-native": "4.0.0",
 "flow-bin": "^0.56.0",
 "jest": "21.2.1",
 "react-test-renderer": "16.0.0",
 "rn-nodeify": "github:tradle/rn-nodeify"
},
"jest": {
 "preset": "react-native"
},
"react-native": {
 "zlib": "browserify-zlib",
 "console": "console-browserify",
 "constants": "constants-browserify",
 "crypto": "react-native-crypto",
 "dns": "dns.js",
 "net": "react-native-tcp",
 "domain": "domain-browser",
 "http": "@tradle/react-native-http",
 "https": "https-browserify",
 "os": "react-native-os",
 "path": "path-browserify",
 "querystring": "querystring-es3",
 "fs": "react-native-level-fs",
 "_stream_transform": "readable-stream/transform",
 "_stream_readable": "readable-stream/readable",
 "_stream_writable": "readable-stream/writable",
 "_stream_duplex": "readable-stream/duplex",
 "_stream_passthrough": "readable-stream/passthrough",
 "dgram": "react-native-udp",
 "stream": "stream-browserify",
 "timers": "timers-browserify",
 "tty": "tty-browserify",
 "vm": "vm-browserify",
 "tls": false
},
"browser": {
 "zlib": "browserify-zlib",
 "console": "console-browserify",
 "constants": "constants-browserify",
 "crypto": "react-native-crypto",
 "dns": "dns.js",
 "net": "react-native-tcp",
 "domain": "domain-browser",
 "http": "@tradle/react-native-http",
 "https": "https-browserify",
 "os": "react-native-os",
 "path": "path-browserify",
 "querystring": "querystring-es3",
 "fs": "react-native-level-fs",
 "_stream_transform": "readable-stream/transform",
 "_stream_readable": "readable-stream/readable",
 "_stream_writable": "readable-stream/writable",
 "_stream_duplex": "readable-stream/duplex",
 "_stream_passthrough": "readable-stream/passthrough",
 "dgram": "react-native-udp",
 "stream": "stream-browserify",
 "timers": "timers-browserify",
 "tty": "tty-browserify",
 "vm": "vm-browserify",
 "tls": false
}
}

我的npm install --verbose给出了以下内容

enter image description here

我尝试过的解决方案:

  • npm cache clean --force && npm install
  • 删除了我的package-lock.json,并按照此帖子https://github.com/npm/npm/issues/17228
  • 的建议尝试了npm install
  • 我尝试使用npm仅安装react-native-http,但仍挂起

在我的npm挂起之后,我的活动监视器显示npm的100%cpu使用量

0 个答案:

没有答案