Ionic and cordova install failed: invalid portocol: null


#1

I try to install ionic and cordova with npm and i get error in console:

And npm-debug content is:

0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘install’,
1 verbose cli ‘ionic’ ]
2 info using npm@3.10.8
3 info using node@v6.9.1
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData ionic
8 silly fetchNamedPackageData ionic
9 silly mapToRegistry name ionic
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry http://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: ‘ionic’,
12 silly mapToRegistry scope: null,
12 silly mapToRegistry escapedName: ‘ionic’,
12 silly mapToRegistry name: ‘ionic’,
12 silly mapToRegistry rawSpec: ‘’,
12 silly mapToRegistry spec: ‘latest’,
12 silly mapToRegistry type: ‘tag’ }
13 silly mapToRegistry uri http://registry.npmjs.org/ionic
14 verbose request uri http://registry.npmjs.org/ionic
15 verbose request no auth needed
16 info attempt registry request try #1 at 01:13:17
17 verbose request id 7e4ee4068c4ce543
18 http request GET http://registry.npmjs.org/ionic
19 info retry will retry, error on last attempt: Error: Invalid protocol: null
20 info attempt registry request try #2 at 01:13:27
21 http request GET http://registry.npmjs.org/ionic
22 info retry will retry, error on last attempt: Error: Invalid protocol: null
23 info attempt registry request try #3 at 01:14:27
24 http request GET http://registry.npmjs.org/ionic
25 silly fetchPackageMetaData Error: Invalid protocol: null
25 silly fetchPackageMetaData at Request.init (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\request.js:460:31)
25 silly fetchPackageMetaData at new Request (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\request.js:129:8)
25 silly fetchPackageMetaData at request (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\index.js:55:10)
25 silly fetchPackageMetaData at CachingRegistryClient.makeRequest (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\request.js:158:13)
25 silly fetchPackageMetaData at C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\request.js:66:17
25 silly fetchPackageMetaData at RetryOperation._fn (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\attempt.js:18:5)
25 silly fetchPackageMetaData at Timeout._onTimeout (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\node_modules\retry\lib\retry_operation.js:68:10)
25 silly fetchPackageMetaData at ontimeout (timers.js:365:14)
25 silly fetchPackageMetaData at tryOnTimeout (timers.js:237:5)
25 silly fetchPackageMetaData at Timer.listOnTimeout (timers.js:207:5)
25 silly fetchPackageMetaData error for ionic Error: Invalid protocol: null
25 silly fetchPackageMetaData at Request.init (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\request.js:460:31)
25 silly fetchPackageMetaData at new Request (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\request.js:129:8)
25 silly fetchPackageMetaData at request (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\index.js:55:10)
25 silly fetchPackageMetaData at CachingRegistryClient.makeRequest (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\request.js:158:13)
25 silly fetchPackageMetaData at C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\request.js:66:17
25 silly fetchPackageMetaData at RetryOperation._fn (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\attempt.js:18:5)
25 silly fetchPackageMetaData at Timeout._onTimeout (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\node_modules\retry\lib\retry_operation.js:68:10)
25 silly fetchPackageMetaData at ontimeout (timers.js:365:14)
25 silly fetchPackageMetaData at tryOnTimeout (timers.js:237:5)
25 silly fetchPackageMetaData at Timer.listOnTimeout (timers.js:207:5)
26 silly rollbackFailedOptional Starting
27 silly rollbackFailedOptional Finishing
28 silly runTopLevelLifecycles Finishing
29 silly install printInstalled
30 verbose stack Error: Invalid protocol: null
30 verbose stack at Request.init (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\request.js:460:31)
30 verbose stack at new Request (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\request.js:129:8)
30 verbose stack at request (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\request\index.js:55:10)
30 verbose stack at CachingRegistryClient.makeRequest (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\request.js:158:13)
30 verbose stack at C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\request.js:66:17
30 verbose stack at RetryOperation._fn (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\lib\attempt.js:18:5)
30 verbose stack at Timeout._onTimeout (C:\Users\amaso\AppData\Roaming\nvm\v6.9.1\node_modules\npm\node_modules\npm-registry-client\node_modules\retry\lib\retry_operation.js:68:10)
30 verbose stack at ontimeout (timers.js:365:14)
30 verbose stack at tryOnTimeout (timers.js:237:5)
30 verbose stack at Timer.listOnTimeout (timers.js:207:5)
31 verbose cwd C:\Users\amaso\Desktop\ws
32 error Windows_NT 10.0.14393
33 error argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” "ionic"
34 error node v6.9.1
35 error npm v3.10.8
36 error Invalid protocol: null
37 error If you need help, you may report this error at:
37 error https://github.com/npm/npm/issues
38 verbose exit [ 1, true ]