Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting npm ERR! exited with error code: 128

I tried 'RNVectorIcons' package in my react native project using the following link react-native-vector-icons.I used pod install command in my terminal.But I got the following error in my terminal window.

Analyzing dependencies
Fetching podspec for `RNVectorIcons` from `../node_modules/react-native-vector-icons`
Downloading dependencies
Installing RNVectorIcons (4.6.0)
Installing React (0.11.0)
[!] /bin/bash -c 
set -e
npm install --production

npm WARN deprecated [email protected]: connect 2.x series is deprecated
npm WARN deprecated [email protected]: Babel 5 is no longer being maintained. Upgrade to Babel 6.
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Copy its ~20 LOC directly into your code instead.
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated [email protected]: This package is unmaintained. Use @sinonjs/formatio instead
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/facebook/react.git
npm ERR! 
npm ERR! undefined
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/macmini1/.npm/_logs/2018-06-21T12_59_11_182Z-debug.log

my package.json file look like the following:

{
  "name": "sample",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "gulp": "gulp"
  },
  "dependencies": {
    "eslint": "4.19.1",
    "eslint-config-airbnb": "16.1.0",
    "eslint-config-airbnb-base": "12.1.0",
    "eslint-config-rallycoding": "3.2.0",
    "eslint-import-resolver-webpack": "0.10.0",
    "eslint-plugin-import": "2.12.0",
    "eslint-plugin-jsx-a11y": "6.0.3",
    "eslint-plugin-react": "7.8.2",
    "react": "16.3.1",
    "react-native": "0.55.4",
    "react-native-vector-icons": "4.6.0",
    "react-navigation": "2.3.1"
  },
  "devDependencies": {
    "babel-jest": "23.0.1",
    "babel-preset-react-native": "4.0.0",
    "jest": "23.1.0",
    "react-test-renderer": "16.3.1"
  },
  "jest": {
    "preset": "react-native"
  }

debug.log file is

1609 verbose stack Error: exited with error code: 128
1609 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js:12:19)
1609 verbose stack     at ChildProcess.emit (events.js:182:13)
1609 verbose stack     at maybeClose (internal/child_process.js:961:16)
1609 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
1610 verbose cwd /Users/macmini1/Library/Caches/CocoaPods/Pods/Release/React/0.11.0-ab1a2
1611 verbose Darwin 17.0.0
1612 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--production"
1613 verbose node v10.4.1
1614 verbose npm  v6.1.0
1615 error Error while executing:
1615 error /usr/bin/git ls-remote -h -t git://github.com/facebook/react.git
1615 error
1615 error undefined
1615 error exited with error code: 128
1616 verbose exit [ 1, true ]

How to solve this issue?

like image 515
IKKA Avatar asked Jun 21 '18 13:06

IKKA


People also ask

Why NPM install throws error?

The error in NPM, 'error package install failed, see above', can occur when the user creates a new project in Angular using Node. js using VS code. This means that NPM is corrupted in your system, and must reinstall NPM.


1 Answers

Could you provide the contents of the debug log? Did you only experience this issue since adding this package? Can you also post the content of your package.json file?

Do also please have look at this question/solution, it does seem like the problem you're having: react-native init AwesomeProject unable to connect to github.com

Update

It could be related to the way github is being accessed. Could you try running the following command before trying it again?

git config --global url."https://".insteadOf git://
like image 128
Sanders Avatar answered Nov 14 '22 21:11

Sanders