angularjsangularreactjsnodesangular-in-memory-web-api

How to configure node live server? I'm getting rollbackFailedOptionalerror


I tried Http registry and tried proxy configuration.

npm config rm proxy
npm config rm https-proxy

My versions:

D:\Angular_code>node -v
v8.4.0

D:\Angular_code>npm -v
5.3.0

Can anybody figure out this please. I'm struggling for almost a day:(


 Microsoft Windows [Version 6.1.7601]
 Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

 D:\Angular_code>npm install -g live-server
npm ERR! code ECONNREFUSED

npm ERR! errno ECONNREFUSED

npm ERR! FetchError: request to http://registry.npmjs.org/live-server failed, re
ason: connect ECONNREFUSED 74.122.238.10:8080

npm ERR!     at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\n
pm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-np
m\src\index.js:68:14)
npm ERR!     at emitOne (events.js:115:13)
npm ERR!     at ClientRequest.emit (events.js:210:7)
npm ERR!     at Socket.socketErrorListener (_http_client.js:401:9)
npm ERR!     at emitOne (events.js:115:13)
npm ERR!     at Socket.emit (events.js:210:7)
npm ERR!     at emitErrorNT (internal/streams/destroy.js:64:8)
npm ERR!     at _combinedTickCallback (internal/process/next_tick.js:138:11)
npm ERR!     at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR!  { FetchError: request to http://registry.npmjs.org/live-server failed,
 reason: connect ECONNREFUSED 74.122.238.10:8080
npm ERR!     at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\n
pm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-np
m\src\index.js:68:14)
npm ERR!     at emitOne (events.js:115:13)
npm ERR!     at ClientRequest.emit (events.js:210:7)
npm ERR!     at Socket.socketErrorListener (_http_client.js:401:9)
npm ERR!     at emitOne (events.js:115:13)
npm ERR!     at Socket.emit (events.js:210:7)
npm ERR!     at emitErrorNT (internal/streams/destroy.js:64:8)
npm ERR!     at _combinedTickCallback (internal/process/next_tick.js:138:11)
npm ERR!     at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR!   message: 'request to http://registry.npmjs.org/live-server failed, re
ason: connect ECONNREFUSED 74.122.238.10:8080',
npm ERR!   type: 'system',

npm ERR!   errno: 'ECONNREFUSED',

npm ERR!   code: 'ECONNREFUSED',

npm ERR!   stack: 'FetchError: request to http://registry.npmjs.org/live-server
failed, reason: connect ECONNREFUSED 74.122.238.10:8080
   at ClientRequest.re
q.on.err (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\pacote\\no
de_modules\\make-fetch-happen\\node_modules\\node-fetch-npm\\src\\index.js:68:14
)
   at emitOne (events.js:115:13)\n    at ClientRequest.emit (events.js:210:7
)   at Socket.socketErrorListener (_http_client.js:401:9)\n    at emitOne (ev
ents.js:115:13)\n    at Socket.emit (events.js:210:7)\n    at emitErrorNT (inter
nal/streams/destroy.js:64:8)
   at _combinedTickCallback (internal/process/nex
t_tick.js:138:11)
   at process._tickCallback (internal/process/next_tick.js:1
80:9)' }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'


npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\626484\AppData\Roaming\npm-cache\_logs\2018-01-17T14_48_21
_042Z-debug.log

Solution

  • npm config set proxy http://"username:pass@word"@proxy.xxxxxx.com:portnumber

    npm config set https-proxy http://"username:pass@word"@proxy.xxxxxx.com:portnumber

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

    npm set strict-ssl false

    This worked for me...Thankyou all