Error running npm i react-image-crop --save


(Thomas H Pax) #1

What I Wanted to Do

Trying to install react-image-crop

What Happened Instead

I got all of these errors

Reproduction Steps

npm i react-image-crop --save
I ran that at the top level of my application

Details

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘i’,
1 verbose cli ‘react-image-crop’,
1 verbose cli ‘–save’ ]
2 info using npm@6.4.1
3 info using node@v10.13.0
4 verbose npm-session 401592e517b9b173
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/react-image-crop 824ms
8 silly pacote range manifest for react-image-crop@^6.0.8 fetched in 848ms
9 verbose stack Error: Argument #2: Expected string but got null
9 verbose stack at exports.findRequirement (/usr/local/lib/node_modules/npm/lib/install/deps.js:721:3)
9 verbose stack at findChild (/usr/local/lib/node_modules/npm/lib/install/deps.js:109:17)
9 verbose stack at computeMetadata (/usr/local/lib/node_modules/npm/lib/install/deps.js:119:9)
9 verbose stack at Installer.normalizeCurrentTree (/usr/local/lib/node_modules/npm/lib/install.js:408:3)
9 verbose stack at Array. (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
9 verbose stack at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
9 verbose stack at /usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
9 verbose stack at iferr (/usr/local/lib/node_modules/npm/lib/install.js:362:5)
9 verbose stack at a (/usr/local/lib/node_modules/npm/node_modules/iferr/iferr.js:3:64)
9 verbose stack at cb (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
9 verbose stack at /usr/local/lib/node_modules/npm/node_modules/call-limit/call-limit.js:22:12
9 verbose stack at process._tickCallback (internal/process/next_tick.js:61:11)
10 verbose cwd /Users/thom/forms
11 verbose Darwin 17.7.0
12 verbose argv “/usr/local/bin/node” “/usr/local/bin/npm” “i” “react-image-crop” “–save”
13 verbose node v10.13.0
14 verbose npm v6.4.1
15 error code EINVALIDTYPE
16 error typeerror Error: Argument #2: Expected string but got null
16 error typeerror at exports.findRequirement (/usr/local/lib/node_modules/npm/lib/install/deps.js:721:3)
16 error typeerror at findChild (/usr/local/lib/node_modules/npm/lib/install/deps.js:109:17)
16 error typeerror at computeMetadata (/usr/local/lib/node_modules/npm/lib/install/deps.js:119:9)
16 error typeerror at Installer.normalizeCurrentTree (/usr/local/lib/node_modules/npm/lib/install.js:408:3)
16 error typeerror at Array. (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
16 error typeerror at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
16 error typeerror at /usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
16 error typeerror at iferr (/usr/local/lib/node_modules/npm/lib/install.js:362:5)
16 error typeerror at a (/usr/local/lib/node_modules/npm/node_modules/iferr/iferr.js:3:64)
16 error typeerror at cb (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
16 error typeerror at /usr/local/lib/node_modules/npm/node_modules/call-limit/call-limit.js:22:12
16 error typeerror at process._tickCallback (internal/process/next_tick.js:61:11)
17 error typeerror This is an error with npm itself. Please report this error at:
17 error typeerror https://npm.community
18 verbose exit [ 1, true ]

Platform Info

2012 MacBook Pro
16Gram
MacOS 10.13.6

$ npm --versions
{ forms: '0.1.0',
  npm: '6.4.1',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.34.0',
  node: '10.13.0',
  openssl: '1.1.0i',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '6.8.275.32-node.36',
  zlib: '1.2.11' }
$ node -p process.platform
darwin

(Lars Willighagen) #2

Does this error only happen when you install react-image-crop? I can’t reproduce it just by running

npm i react-image-crop --save