cli icon indicating copy to clipboard operation
cli copied to clipboard

npm install get sttuck

Open Rushikeshkalhapure opened this issue 4 years ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

npm install gets stuck after some time on "idealTree:FE-SPECTATOR: sill idealTree buildDeps"

Expected Behavior

npm install should install all packages

Steps To Reproduce

  1. OS: Windows -10
  2. node -v 17.3.1 npm -v 8.3.0
  3. npm config ls- "builtin" config from C:\Program Files\nodejs\node_modules\npm\npmrc

prefix = "C:\Users\27043\AppData\Roaming\npm"

; "global" config from C:\Users\27043\AppData\Roaming\npm\etc\npmrc

proxy = "https://api-dev.stcplay.cloud/" ; registry = "http://registry.npmjs.org/" ; overridden by user

; "user" config from C:\Users\27043.npmrc

legacy-peer-deps = true registry = "http://registry.npmjs.org/"

; node bin location = C:\Program Files\nodejs\node.exe ; cwd = D:\FE-SPECTATOR ; HOME = C:\Users\27043 ; Run npm config ls -l to show all defaults.

Environment

  • npm:
  • Node.js:
  • OS Name:
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

Rushikeshkalhapure avatar Feb 16 '22 16:02 Rushikeshkalhapure

@Rushikeshkalhapure please provide more steps to reproduce.

fritzy avatar Feb 16 '22 22:02 fritzy

@fritzy I have cloned project repo and tried to install node modules. But it stuck and after some time failed with error

npm ERR! request to http://registry.npmjs.org/react-top-loading-bar failed, reason: Hostname/IP does not match certificate's altnames: Host: api-dev.stcplay.cloud. is not in the cert's altnames: DNS:*.execute-api.me-south-1.amazonaws.com

Rushikeshkalhapure avatar Feb 17 '22 03:02 Rushikeshkalhapure

Attaching log after failure.

0 verbose cli [ 0 verbose cli 'C:\Program Files\nodejs\node.exe', 0 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 0 verbose cli 'install' 0 verbose cli ] 1 info using [email protected] 2 info using [email protected] 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 1ms 5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 5ms 6 timing config:load:builtin Completed in 5ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 1ms 9 timing config:load:file:D:\FE-SPECTATOR.npmrc Completed in 0ms 10 timing config:load:project Completed in 1017ms 11 timing config:load:file:C:\Users\27043.npmrc Completed in 1ms 12 timing config:load:user Completed in 1ms 13 timing config:load:file:C:\Users\27043\AppData\Roaming\npm\etc\npmrc Completed in 1ms 14 timing config:load:global Completed in 1ms 15 timing config:load:validate Completed in 2ms 16 timing config:load:credentials Completed in 0ms 17 timing config:load:setEnvs Completed in 0ms 18 timing config:load Completed in 1031ms 19 timing npm:load:configload Completed in 1031ms 20 timing npm:load:setTitle Completed in 1ms 21 timing config:load:flatten Completed in 3ms 22 timing npm:load:display Completed in 4ms 23 verbose logfile C:\Users\27043\AppData\Local\npm-cache_logs\2022-02-17T03_31_56_627Z-debug-0.log 24 timing npm:load:logFile Completed in 11ms 25 timing npm:load:timers Completed in 0ms 26 timing npm:load:configScope Completed in 0ms 27 timing npm:load Completed in 1049ms 28 timing arborist:ctor Completed in 1ms 29 silly logfile start cleaning logs, removing 2 files 30 timing idealTree:init Completed in 1785ms 31 timing idealTree:userRequests Completed in 0ms 32 silly idealTree buildDeps 33 silly fetch manifest react-top-loading-bar@^2.1.0 34 silly placeDep ROOT react-top-loading-bar@ OK for: [email protected] want: ^2.1.0 35 timing idealTree:#root Completed in 72301ms 36 timing idealTree:node_modules/react-top-loading-bar Completed in 0ms 37 timing idealTree:buildDeps Completed in 72303ms 38 timing idealTree:fixDepFlags Completed in 22ms 39 timing idealTree Completed in 74111ms 40 timing command:install Completed in 74125ms 41 verbose type system 42 verbose stack FetchError: request to http://registry.npmjs.org/react-top-loading-bar failed, reason: Hostname/IP does not match certificate's altnames: Host: api-dev.stcplay.cloud. is not in the cert's altnames: DNS:.execute-api.me-south-1.amazonaws.com 42 verbose stack at ClientRequest. (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:110:14) 42 verbose stack at ClientRequest.emit (node:events:390:28) 42 verbose stack at TLSSocket.socketErrorListener (node:_http_client:442:9) 42 verbose stack at TLSSocket.emit (node:events:390:28) 42 verbose stack at emitErrorNT (node:internal/streams/destroy:164:8) 42 verbose stack at emitErrorCloseNT (node:internal/streams/destroy:129:3) 42 verbose stack at processTicksAndRejections (node:internal/process/task_queues:83:21) 43 verbose cwd D:\FE-SPECTATOR 44 verbose Windows_NT 10.0.19042 45 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" 46 verbose node v17.3.1 47 verbose npm v8.3.0 48 error code ERR_TLS_CERT_ALTNAME_INVALID 49 error errno ERR_TLS_CERT_ALTNAME_INVALID 50 error request to http://registry.npmjs.org/react-top-loading-bar failed, reason: Hostname/IP does not match certificate's altnames: Host: api-dev.stcplay.cloud. is not in the cert's altnames: DNS:.execute-api.me-south-1.amazonaws.com 51 verbose exit 1 52 timing npm Completed in 75952ms 53 verbose unfinished npm timer reify 1645068718445 54 verbose unfinished npm timer reify:loadTrees 1645068718456 55 verbose code 1 56 error A complete log of this run can be found in: 56 error C:\Users\27043\AppData\Local\npm-cache_logs\2022-02-17T03_31_56_627Z-debug-0.log

Rushikeshkalhapure avatar Feb 17 '22 03:02 Rushikeshkalhapure

@Rushikeshkalhapure This may be an issue related to your proxy rather than a bug in npm. Can you try running npm config set strict-ssl false and see if that allows you to bypass the cert-related issue?

t1m0thyj avatar Feb 22 '22 20:02 t1m0thyj

Tried with npm "npm config set strict-ssl false" and it works. Thanks, @t1m0thyj

Rushikeshkalhapure avatar Feb 23 '22 04:02 Rushikeshkalhapure