npm i throws an error 'Cannot read property 'match' of undefined'
Closed this issue · 1 comments
shide1989 commented
Hi,
I'm trying to install react-native-global-props using npm i --save react-native-global-props
but then npm throws this error :
17 verbose stack TypeError: Cannot read property 'match' of undefined
17 verbose stack at tarballToVersion (/usr/local/lib/node_modules/npm/lib/install/inflate-shrinkwrap.js:87:20)
17 verbose stack at inflatableChild (/usr/local/lib/node_modules/npm/lib/install/inflate-shrinkwrap.js:99:22)
17 verbose stack at BB.each (/usr/local/lib/node_modules/npm/lib/install/inflate-shrinkwrap.js:55:12)
17 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
17 verbose stack at Object.gotValue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/reduce.js:155:18)
17 verbose stack at Object.gotAccum (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/reduce.js:144:25)
17 verbose stack at Object.tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
17 verbose stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
17 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
17 verbose stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
17 verbose stack at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
17 verbose stack at _drainQueueStep (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:138:12)
17 verbose stack at _drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
17 verbose stack at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)
17 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
17 verbose stack at runCallback (timers.js:705:18)
18 verbose cwd /Users/Shide/Developments/blacksmith/holeon/app
19 verbose Darwin 17.7.0
20 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "react-native-global-props" "--save"
21 verbose node v10.15.0
22 verbose npm v6.7.0
23 error Cannot read property 'match' of undefined
24 verbose exit [ 1, true ]
Npm version : 6.7.0
Node version : v10.15.0
I'm using this command in a react-native project with other packages installed :
"circular-json": "^0.5.5",
"cross-os": "^1.3.0",
"firebase": "^5.5.3",
"immutability-helper": "^2.8.1",
"moment": "^2.22.2",
"multer": "latest",
"react": "16.6.0-alpha.8af6728",
"react-native": "^0.57.5",
"react-native-calendars": "^1.21.0",
"react-native-elements": "^0.19.1",
"react-native-firebase": "^4.2.0",
"react-native-fs": "^2.12",
"react-native-gifted-chat": "^0.5.0",
"react-native-google-places": "^2.5.2",
"react-native-i18n": "^2.0.12",
"react-native-image-picker": "^0.27.1",
"react-native-keyboard-aware-scroll-view": "^0.7.4",
"react-native-linear-gradient": "^2.4.0",
"react-native-maps": "^0.23.0",
"react-native-modal": "^6.5.0",
"react-native-stripe-api": "^0.1.0",
"react-native-swipeable-row": "^0.8.1",
"react-native-vector-icons": "^5.0.0",
"react-native-video": "^3.2.0",
"react-navigation": "^2.3.1",
"tcomb-form-native": "^0.6.13",
"tcomb-validation": "^3.4.1"
I'm not sure wherever it's related to npm or rngp
shide1989 commented
erf..searched a bit further, it seemed to be related to package-lock.json..
an rm package-lock.json
solved the issue