Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm cannot install cordova and ionic #16636

Closed
gr1d99 opened this issue May 16, 2017 · 5 comments
Closed

npm cannot install cordova and ionic #16636

gr1d99 opened this issue May 16, 2017 · 5 comments

Comments

@gr1d99
Copy link

gr1d99 commented May 16, 2017

when i run the command below
npm install -g cordova ionic
i get these errors

npm ERR! fetch failed https://registry.npmjs.org/cordova-lib/-/cordova-lib-7.0.1.tgz
npm WARN retry will retry, error on last attempt: TypeError: socket._handle.asyncReset is not a function
@kenany kenany added the support label May 16, 2017
@kenany
Copy link
Contributor

kenany commented May 16, 2017

Is there a debug log file you can upload to https://gist.github.com/ and link here? Just posting two lines removes a lot of context as to what is going on here. Thanks!

@sebdeckers
Copy link
Contributor

sebdeckers commented May 21, 2017

@kenany FWIW I'm getting the same error with different packages.

3843 silly fetchNamedPackageData mime-types
3844 silly mapToRegistry name mime-types
3845 silly mapToRegistry using default registry
3846 silly mapToRegistry registry https://registry.npmjs.org/
3847 silly mapToRegistry data Result {
3847 silly mapToRegistry   raw: 'mime-types',
3847 silly mapToRegistry   scope: null,
3847 silly mapToRegistry   escapedName: 'mime-types',
3847 silly mapToRegistry   name: 'mime-types',
3847 silly mapToRegistry   rawSpec: '',
3847 silly mapToRegistry   spec: 'latest',
3847 silly mapToRegistry   type: 'tag' }
3848 silly mapToRegistry uri https://registry.npmjs.org/mime-types
3849 verbose request uri https://registry.npmjs.org/mime-types
3850 verbose request no auth needed
3851 info attempt registry request try #1 at 20:25:54
3852 verbose request using bearer token for auth
3853 http request GET https://registry.npmjs.org/mime-types
3854 info retry will retry, error on last attempt: TypeError: socket._handle.asyncReset is not a function
3855 info attempt registry request try #2 at 20:26:04
3856 verbose request using bearer token for auth
3857 http request GET https://registry.npmjs.org/mime-types
3858 info retry will retry, error on last attempt: TypeError: socket._handle.asyncReset is not a function
3859 info attempt registry request try #3 at 20:27:04
3860 verbose request using bearer token for auth
3861 http request GET https://registry.npmjs.org/mime-types
3862 silly fetchPackageMetaData TypeError: socket._handle.asyncReset is not a function
3862 silly fetchPackageMetaData     at Agent.addRequest (_http_agent.js:170:20)
3862 silly fetchPackageMetaData     at new ClientRequest (_http_client.js:269:16)
3862 silly fetchPackageMetaData     at Object.request (http.js:39:10)
3862 silly fetchPackageMetaData     at Object.request (https.js:230:15)
3862 silly fetchPackageMetaData     at Request.start (/usr/local/lib/node_modules/npm/node_modules/request/request.js:755:32)
3862 silly fetchPackageMetaData     at Request.end (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1525:10)
3862 silly fetchPackageMetaData     at end (/usr/local/lib/node_modules/npm/node_modules/request/request.js:567:14)
3862 silly fetchPackageMetaData     at Immediate.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:581:7)
3862 silly fetchPackageMetaData     at runCallback (timers.js:800:20)
3862 silly fetchPackageMetaData     at tryOnImmediate (timers.js:762:5)
3862 silly fetchPackageMetaData     at processImmediate [as _immediateCallback] (timers.js:733:5)
3862 silly fetchPackageMetaData  error for mime-types@~2.1.11 TypeError: socket._handle.asyncReset is not a function
3862 silly fetchPackageMetaData     at Agent.addRequest (_http_agent.js:170:20)
3862 silly fetchPackageMetaData     at new ClientRequest (_http_client.js:269:16)
3862 silly fetchPackageMetaData     at Object.request (http.js:39:10)
3862 silly fetchPackageMetaData     at Object.request (https.js:230:15)
3862 silly fetchPackageMetaData     at Request.start (/usr/local/lib/node_modules/npm/node_modules/request/request.js:755:32)
3862 silly fetchPackageMetaData     at Request.end (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1525:10)
3862 silly fetchPackageMetaData     at end (/usr/local/lib/node_modules/npm/node_modules/request/request.js:567:14)
3862 silly fetchPackageMetaData     at Immediate.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:581:7)
3862 silly fetchPackageMetaData     at runCallback (timers.js:800:20)
3862 silly fetchPackageMetaData     at tryOnImmediate (timers.js:762:5)
3862 silly fetchPackageMetaData     at processImmediate [as _immediateCallback] (timers.js:733:5)
3863 silly rollbackFailedOptional Starting
3864 silly rollbackFailedOptional Finishing
3865 silly runTopLevelLifecycles Finishing
3866 silly install printInstalled
3867 verbose stack TypeError: socket._handle.asyncReset is not a function
3867 verbose stack     at Agent.addRequest (_http_agent.js:170:20)
3867 verbose stack     at new ClientRequest (_http_client.js:269:16)
3867 verbose stack     at Object.request (http.js:39:10)
3867 verbose stack     at Object.request (https.js:230:15)
3867 verbose stack     at Request.start (/usr/local/lib/node_modules/npm/node_modules/request/request.js:755:32)
3867 verbose stack     at Request.end (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1525:10)
3867 verbose stack     at end (/usr/local/lib/node_modules/npm/node_modules/request/request.js:567:14)
3867 verbose stack     at Immediate.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:581:7)
3867 verbose stack     at runCallback (timers.js:800:20)
3867 verbose stack     at tryOnImmediate (timers.js:762:5)
3867 verbose stack     at processImmediate [as _immediateCallback] (timers.js:733:5)
3868 verbose cwd /Users/seb/Code/sebdeckers/http2server
3869 verbose Darwin 16.5.0
3870 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
3871 verbose node v8.0.0-pre
3872 verbose npm  v4.5.0
3873 error socket._handle.asyncReset is not a function
3874 verbose exit [ 1, true ]

@sebdeckers
Copy link
Contributor

Note that I'm running the nodejs/http2 fork which is only a few days behind nodejs/node#master. Possibly related to: nodejs/node#13045

@sebdeckers
Copy link
Contributor

Fixed by nodejs/node@6bfdeed

sebdeckers added a commit to sebdeckers/http2 that referenced this issue May 25, 2017
@npm-robot
Copy link

We're closing this support issue as it has gone three days without activity. The npm CLI team itself does not provide support via this issue tracker, but we are happy when users help each other here. In our experience once a support issue goes dormant it's unlikely to get further activity. If you're still having problems, you may be better served by joining package.community and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants