Impossible to download with npm i

(Remontees) #1

Hello !

What I Wanted to Do

sudo npm install react-native-formik

What Happened Instead

npm ERR! Linux 4.15.0-45-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "react-native-formik" "--save"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:190:5
npm ERR! typeerror     at /usr/share/npm/node_modules/slide/lib/async-map.js:52:35
npm ERR! typeerror     at Array.forEach (<anonymous>)
npm ERR! typeerror     at /usr/share/npm/node_modules/slide/lib/async-map.js:52:11
npm ERR! typeerror     at Array.forEach (<anonymous>)
npm ERR! typeerror     at asyncMap (/usr/share/npm/node_modules/slide/lib/async-map.js:51:8)
npm ERR! typeerror     at exports.loadRequestedDeps (/usr/share/npm/lib/install/deps.js:188:3)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

Reproduction Steps

Do sudo npm install react-native-formik in a npm repo

Details

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'install',
1 verbose cli   'react-native-formik',
1 verbose cli   '--save' ]
2 info using npm@3.5.2
3 info using node@v8.10.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData react-native-formik
8 silly fetchNamedPackageData react-native-formik
9 silly mapToRegistry name react-native-formik
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry uri https://registry.npmjs.org/react-native-formik
13 verbose request uri https://registry.npmjs.org/react-native-formik
14 verbose request no auth needed
15 info attempt registry request try #1 at 22:55:56
16 verbose request id 36fe2fae887bebdb
17 verbose etag W/"0084f2ebc9969d11d0dedcc1880e2cb0"
18 verbose lastModified Mon, 11 Feb 2019 13:46:16 GMT
19 http request GET https://registry.npmjs.org/react-native-formik
20 http 304 https://registry.npmjs.org/react-native-formik
21 verbose headers { date: 'Thu, 21 Feb 2019 21:55:57 GMT',
21 verbose headers   connection: 'keep-alive',
21 verbose headers   'set-cookie':
21 verbose headers    [ '__cfduid=dff2faf2fc8dfca031cacf1cb823f2db51550786157; expires=Fri, 21-Feb-20 21:55:57 GMT; path=/; domain=.registry.npmjs.org; HttpOnly' ],
21 verbose headers   'cf-cache-status': 'HIT',
21 verbose headers   'cache-control': 'max-age=300',
21 verbose headers   'cf-ray': '4acc75ca6e6669a6-CDG',
21 verbose headers   etag: '"0084f2ebc9969d11d0dedcc1880e2cb0"',
21 verbose headers   'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
21 verbose headers   'last-modified': 'Mon, 11 Feb 2019 13:46:16 GMT',
21 verbose headers   vary: 'accept-encoding, accept',
21 verbose headers   'x-amz-meta-rev': '28-650a181ec1aa0480801429f94faaee61',
21 verbose headers   server: 'cloudflare' }
22 silly get cb [ 304,
22 silly get   { date: 'Thu, 21 Feb 2019 21:55:57 GMT',
22 silly get     connection: 'keep-alive',
22 silly get     'set-cookie':
22 silly get      [ '__cfduid=dff2faf2fc8dfca031cacf1cb823f2db51550786157; expires=Fri, 21-Feb-20 21:55:57 GMT; path=/; domain=.registry.npmjs.org; HttpOnly' ],
22 silly get     'cf-cache-status': 'HIT',
22 silly get     'cache-control': 'max-age=300',
22 silly get     'cf-ray': '4acc75ca6e6669a6-CDG',
22 silly get     etag: '"0084f2ebc9969d11d0dedcc1880e2cb0"',
22 silly get     'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
22 silly get     'last-modified': 'Mon, 11 Feb 2019 13:46:16 GMT',
22 silly get     vary: 'accept-encoding, accept',
22 silly get     'x-amz-meta-rev': '28-650a181ec1aa0480801429f94faaee61',
22 silly get     server: 'cloudflare' } ]
23 verbose etag https://registry.npmjs.org/react-native-formik from cache
24 verbose get saving react-native-formik to /home/michel/.npm/registry.npmjs.org/react-native-formik/.cache.json
25 silly install normalizeTree
26 silly loadCurrentTree Finishing
27 silly loadIdealTree Starting
28 silly install loadIdealTree
29 silly cloneCurrentTree Starting
30 silly install cloneCurrentTreeToIdealTree
31 silly cloneCurrentTree Finishing
32 silly loadShrinkwrap Starting
33 silly install loadShrinkwrap
34 silly loadShrinkwrap Finishing
35 silly loadAllDepsIntoIdealTree Starting
36 silly install loadAllDepsIntoIdealTree
37 verbose stack Error: Missing required argument #1
37 verbose stack     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
37 verbose stack     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
37 verbose stack     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
37 verbose stack     at /usr/share/npm/lib/install/deps.js:190:5
37 verbose stack     at /usr/share/npm/node_modules/slide/lib/async-map.js:52:35
37 verbose stack     at Array.forEach (<anonymous>)
37 verbose stack     at /usr/share/npm/node_modules/slide/lib/async-map.js:52:11
37 verbose stack     at Array.forEach (<anonymous>)
37 verbose stack     at asyncMap (/usr/share/npm/node_modules/slide/lib/async-map.js:51:8)
37 verbose stack     at exports.loadRequestedDeps (/usr/share/npm/lib/install/deps.js:188:3)
38 verbose cwd /home/michel/Projets/perso/test-react/MyTest
39 error Linux 4.15.0-45-generic
40 error argv "/usr/bin/node" "/usr/bin/npm" "install" "react-native-formik" "--save"
41 error node v8.10.0
42 error npm  v3.5.2
43 error code EMISSINGARG
44 error typeerror Error: Missing required argument #1
44 error typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
44 error typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
44 error typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
44 error typeerror     at /usr/share/npm/lib/install/deps.js:190:5
44 error typeerror     at /usr/share/npm/node_modules/slide/lib/async-map.js:52:35
44 error typeerror     at Array.forEach (<anonymous>)
44 error typeerror     at /usr/share/npm/node_modules/slide/lib/async-map.js:52:11
44 error typeerror     at Array.forEach (<anonymous>)
44 error typeerror     at asyncMap (/usr/share/npm/node_modules/slide/lib/async-map.js:51:8)
44 error typeerror     at exports.loadRequestedDeps (/usr/share/npm/lib/install/deps.js:188:3)
45 error typeerror This is an error with npm itself. Please report this error at:
45 error typeerror     <http://github.com/npm/npm/issues>
46 verbose exit [ 1, true ]

Platform Info

Linux Mint 19.1

$ npm --versions
        { npm: '3.5.2',
          ares: '1.14.0',
          cldr: '32.0.1',
          http_parser: '2.7.1',
          icu: '60.2',
          modules: '57',
          nghttp2: '1.30.0',
          node: '8.10.0',
          openssl: '1.0.2n',
          tz: '2017c',
          unicode: '10.0',
          uv: '1.18.0',
          v8: '6.2.414.50',
          zlib: '1.2.11' }

$ node -p process.platform

linux

(Lars Willighagen) #2

That’s a pretty old version of npm, and I can imagine the issue being fixed in newer versions already. From the error, it looks like you have an empty version value in your package.json (or somewhere in node_modules/), but I really can’t tell.

(system) closed #3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.