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

Can't install vue-cli -g [MacOS Sierra, node 6/7, npm 3/4] - Solution: "use http in npm registry setting" #15604

Closed
alundiak opened this issue Jan 28, 2017 · 12 comments

Comments

@alundiak
Copy link

alundiak commented Jan 28, 2017

See details:
vuejs/vue-cli#308

npm ERR! fetch failed https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.22.0.tgz
npm WARN retry will retry, error on last attempt: Error: read ETIMEDOUT

Command: npm install vue-cli -g

Reproduced on:

  • node v6.9.4, npm c3.10.10
  • node v7.5.0, npm v4.1.2

Reported by others, as working fine (no byg reproduced):

  • node v7.4.0, npm v4.0.5

Installed (and removed) successfully, if to use sudo npm install vue-cli -g

cc/ @yyx990803

@amir-s
Copy link

amir-s commented Jan 28, 2017

Tried it on Sierra, it worked fined.

x:~ amir$ node -v
v7.4.0
x:~ amir$ npm -v
4.0.5

@alundiak
Copy link
Author

@amir-s as I stated in initial description, I have issue with node 6.x.

@alundiak alundiak changed the title Can't install vue-cli -g [MacOS Sierra] Can't install vue-cli -g [MacOS Sierra, node 6.9.4, npm 3.10.10] Jan 28, 2017
@JamieMason
Copy link

JamieMason commented Jan 30, 2017

What happens when you run curl https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.22.0.tgz?

@alundiak
Copy link
Author

alundiak commented Jan 30, 2017

@JamieMason this is what happens.

screen shot 2017-01-30 at 17 03 43

If u expect curl download file - it doesn't.

FYI:

curl --version
curl 7.51.0 (x86_64-apple-darwin16.0) libcurl/7.51.0 SecureTransport zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets 

@JamieMason
Copy link

Thanks, I wanted to see if you could hit the registry URL without being blocked by a firewall or something like that. Can you install other packages? Just not this one?

@alundiak
Copy link
Author

alundiak commented Jan 30, 2017

@JamieMason as I stated in initial issue, I don't have any firewall settings, especially related to Node/npm or vue-cli . But as soon as I have issue ONLY with vue-cli, I thought it's their issues. Please don't tell me it's their issue :)

As u can see, I can install rimraf, grunt-cli and bower with -g:

screen shot 2017-01-30 at 17 34 13

@JamieMason
Copy link

Apologies @alundiak, hopefully someone connected to this project can help more. Until then maybe something in Closed issues containing "ETIMEDOUT" can help you.

@alundiak
Copy link
Author

alundiak commented Jan 30, 2017

@legodude17 yes, I can download via browser (Chrome).

PS. I've just recently upgraded to Sierra, so might be some hidden changed by MacOS, so I don't know. But the thing which keep me calm - that I can install other modules, but not vue-cli.

I know, that issue might be fixed when I upgrade to node 7.4.0, as @Mir-s mentioned. But it will not the bug fix, rather workaround for me. Unless, vue-cli declare ONLY node 7.x support - then I have to upgrade if so.

cc/ @yyx990803

@alundiak
Copy link
Author

I installed node v6.9.5 (with npm v3.10.10) and issue still remain.
In installed then node v7.5.0 (with nppm v4.1.2) and issue still remain.

here is logs from npm install vue-cli --global --verbose:

npm http 304 https://registry.npmjs.org/babel-helper-optimise-call-expression
npm verb headers { date: 'Fri, 17 Feb 2017 19:34:42 GMT',
npm verb headers   via: '1.1 varnish',
npm verb headers   'cache-control': 'max-age=300',
npm verb headers   etag: 'W/"58a25a27-669d"',
npm verb headers   age: '23',
npm verb headers   connection: 'keep-alive',
npm verb headers   'x-served-by': 'cache-hhn1548-HHN',
npm verb headers   'x-cache': 'HIT',
npm verb headers   'x-cache-hits': '1',
npm verb headers   'x-timer': 'S1487360082.818306,VS0,VE0',
npm verb headers   vary: 'Accept-Encoding' }
npm verb etag https://registry.npmjs.org/babel-helper-optimise-call-expression from cache
npm verb get saving babel-helper-optimise-call-expression to /Users/alund/.npm/registry.npmjs.org/babel-helper-optimise-call-expression/.cache.json
npm verb correctMkdir /Users/alund/.npm correctMkdir not in flight; initializing
npm http 304 https://registry.npmjs.org/babel-helper-define-map
npm verb headers { date: 'Fri, 17 Feb 2017 19:34:42 GMT',
npm verb headers   via: '1.1 varnish',
npm verb headers   'cache-control': 'max-age=300',
npm verb headers   etag: 'W/"58a25a48-7f34"',
npm verb headers   age: '263',
npm verb headers   connection: 'keep-alive',
npm verb headers   'x-served-by': 'cache-hhn1548-HHN',
npm verb headers   'x-cache': 'HIT',
npm verb headers   'x-cache-hits': '2',
npm verb headers   'x-timer': 'S1487360082.819268,VS0,VE0',
npm verb headers   vary: 'Accept-Encoding' }
npm verb etag https://registry.npmjs.org/babel-helper-define-map from cache
npm verb get saving babel-helper-define-map to /Users/alund/.npm/registry.npmjs.org/babel-helper-define-map/.cache.json
npm verb correctMkdir /Users/alund/.npm correctMkdir not in flight; initializing
npm http 304 https://registry.npmjs.org/babel-helper-replace-supers
npm verb headers { date: 'Fri, 17 Feb 2017 19:34:42 GMT',
npm verb headers   via: '1.1 varnish',
npm verb headers   'cache-control': 'max-age=300',
npm verb headers   etag: 'W/"58a25a35-8fa1"',
npm verb headers   age: '264',
npm verb headers   connection: 'keep-alive',
npm verb headers   'x-served-by': 'cache-hhn1530-HHN',
npm verb headers   'x-cache': 'HIT',
npm verb headers   'x-cache-hits': '3',
npm verb headers   'x-timer': 'S1487360082.818139,VS0,VE0',
npm verb headers   vary: 'Accept-Encoding' }
npm verb etag https://registry.npmjs.org/babel-helper-replace-supers from cache
npm verb get saving babel-helper-replace-supers to /Users/alund/.npm/registry.npmjs.org/babel-helper-replace-supers/.cache.json
npm verb correctMkdir /Users/alund/.npm correctMkdir not in flight; initializing
npm verb cache add spec babel-helper-define-map@^6.23.0
npm verb addNamed ">=6.23.0 <7.0.0" is a valid semver range for babel-helper-define-map
npm verb addNameRange registry:https://registry.npmjs.org/babel-helper-define-map not in flight; fetching
npm verb cache add spec babel-helper-optimise-call-expression@^6.23.0
npm verb addNamed ">=6.23.0 <7.0.0" is a valid semver range for babel-helper-optimise-call-expression
npm verb addNameRange registry:https://registry.npmjs.org/babel-helper-optimise-call-expression not in flight; fetching
npm verb cache add spec babel-helper-replace-supers@^6.23.0
npm verb addNamed ">=6.23.0 <7.0.0" is a valid semver range for babel-helper-replace-supers
npm verb addNameRange registry:https://registry.npmjs.org/babel-helper-replace-supers not in flight; fetching
npm verb get https://registry.npmjs.org/babel-helper-optimise-call-expression not expired, no request
npm verb addNamed "latest" is being treated as a dist-tag for babel-helper-optimise-call-expression
npm info addNameTag [ 'babel-helper-optimise-call-expression', 'latest' ]
npm verb addNameTag registry:https://registry.npmjs.org/babel-helper-optimise-call-expression already in flight; waiting
npm verb addNamed "6.23.0" is a plain semver version for babel-helper-optimise-call-expression
npm verb get https://registry.npmjs.org/babel-helper-define-map not expired, no request
npm verb addNamed "latest" is being treated as a dist-tag for babel-helper-define-map
npm info addNameTag [ 'babel-helper-define-map', 'latest' ]
npm verb addNameTag registry:https://registry.npmjs.org/babel-helper-define-map already in flight; waiting
npm verb addNamed "6.23.0" is a plain semver version for babel-helper-define-map
npm verb get https://registry.npmjs.org/babel-helper-replace-supers not expired, no request
npm verb addNamed "latest" is being treated as a dist-tag for babel-helper-replace-supers
npm info addNameTag [ 'babel-helper-replace-supers', 'latest' ]
npm verb addNameTag registry:https://registry.npmjs.org/babel-helper-replace-supers already in flight; waiting
npm verb addNamed "6.23.0" is a plain semver version for babel-helper-replace-supers
npm verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json not in flight; writing
npm verb correctMkdir /Users/alund/.npm correctMkdir not in flight; initializing
npm verb afterAdd /Users/alund/.npm/babel-helper-define-map/6.23.0/package/package.json not in flight; writing
npm verb correctMkdir /Users/alund/.npm correctMkdir not in flight; initializing
npm verb afterAdd /Users/alund/.npm/babel-helper-replace-supers/6.23.0/package/package.json not in flight; writing
npm verb correctMkdir /Users/alund/.npm correctMkdir not in flight; initializing
npm verb afterAdd /Users/alund/.npm/babel-helper-replace-supers/6.23.0/package/package.json written
npm verb afterAdd /Users/alund/.npm/babel-helper-define-map/6.23.0/package/package.json written
npm verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json written
⸨    ░░░░░░░░░░░░░░⸩ ⠼ fetchMetadata: verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json written
⸨    ░░░░░░░░░░░░░░⸩ ⠦ fetchMetadata: verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json written
⸨    ░░░░░░░░░░░░░░⸩ ⠧ fetchMetadata: verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json written
⸨    ░░░░░░░░░░░░░░⸩ ⠧ fetchMetadata: verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json written
⸨    ░░░░░░░░░░░░░░⸩ ⠇ fetchMetadata: verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json written
⸨    ░░░░░░░░░░░░░░⸩ ⠇ fetchMetadata: verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json written
⸨    ░░░░░░░░░░░░░░⸩ ⠏ fetchMetadata: verb afterAdd /Users/alund/.npm/babel-helper-optimise-call-expression/6.23.0/package/package.json written
npm info retry will retry, error on last attempt: Error: read ETIMEDOUT
npm info attempt registry request try #2 at 8:35:19 PM
npm verb etag W/"58815b5e-71e3"
npm verb lastModified Fri, 20 Jan 2017 00:35:42 GMT
npm http request GET https://registry.npmjs.org/babel-helper-function-name
⸨    ░░░░░░░░░░░░░░⸩ ⠏ fetchMetadata: http request GET https://registry.npmjs.org/babel-helper-function-name


npm info retry will retry, error on last attempt: Error: read ETIMEDOUT
⸨    ░░░░░░░░░░░░░░⸩ ⠴ fetchMetadata: info retry will retry, error on last attempt: Error: read ETIMEDOUT
npm info attempt registry request try #3 at 8:36:45 PM
npm verb etag W/"58815b5e-71e3"
npm verb lastModified Fri, 20 Jan 2017 00:35:42 GMT
npm http request GET https://registry.npmjs.org/babel-helper-function-name

@alundiak
Copy link
Author

alundiak commented Feb 17, 2017

Note: My /usr/local/lib/node_modules/ still remain the same - I mean I didn't drop it since I upgraded from node 6.x to node 7.x.

But I dropped folder ~/.npm and by new install I has been recreated, and lot of dependencies installed there. But still, a few babel-related dependencies failed to install. I downloaded manually:

  • babel-plugin-transform-es2015-modules-amd-6.22.0.tgz
  • babel-plugin-transform-es2015-modules-umd-6.23.0.tgz

And composed folder structures similar as babel-plugin-transform-es2015-modules-commonjs or babel-plugin-transform-es2015-modules-systemjs which were installed successfully.
NPM still stuck on one of next dependencies, eg:

npm http fetch GET https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.22.0.tgz

So I did final use case to fix the issue: sudo npm install vue-cli --global and it has been installed:
But with HUGE list of dependencies:

npm info lifecycle vue-cli@2.8.1~postinstall: vue-cli@2.8.1
npm verb unlock done using 
/Users/alund/.npm/_locks/staging-3a08f0df5026584d.lock 
for /usr/local/lib/node_modules/.staging
/usr/local/lib
└─┬ vue-cli@2.8.1 
  ├─┬ async@2.1.4 
  │ └── lodash@4.17.4 
  ├─┬ autoprefixer@6.7.3 
....

Note: I've done it with npm 4.1.2.

When I tried to UNINSTALL vue-cli by command npm uninstall vue-cli -g npm gives me error:

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "uninstall" "vue-cli" "-g"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! path /usr/local/lib/node_modules/vue-cli/node_modules/abbrev
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/vue-cli/node_modules/abbrev'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/vue-cli/node_modules/abbrev'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules/vue-cli/node_modules/abbrev' }
...

AFAIK, it's related to permissions, and I did one more time but with sudo:
sudo npm uninstall vue-cli -g

And vue-cli has been removed.

And again I tried npm install vue-cli -g and again it's failed.

So looks like something wrong with vue-cli nodejs module, which requires SUDO for proper installation. And whose fault it is? npm or view-cli?

cc/ @yyx990803 @JamieMason @amir-s @legodude17

@alundiak alundiak changed the title Can't install vue-cli -g [MacOS Sierra, node 6.9.4, npm 3.10.10] Can't install vue-cli -g [MacOS Sierra, node 6/7, npm 3/4] Feb 17, 2017
@alundiak
Copy link
Author

FYI, I still couldn't have installed vue-cli on 10.12.4 Sierra.

But I discovered, that it's an issue of NPM, and at least changing existed registry https://registry.npmjs.org/ (with https) to:

npm config set registry http://registry.npmjs.org/

helped me, and I finally installed Vue-CLI :)

@alundiak alundiak changed the title Can't install vue-cli -g [MacOS Sierra, node 6/7, npm 3/4] Can't install vue-cli -g [MacOS Sierra, node 6/7, npm 3/4] - Solution: "use http in npm registry setting" Apr 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants