-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Background: we are using quay.io to build docker images for our applications. We have some npm ... commands in the startup script when a container has been brought up.
Recently after upgrading to npm 7, we start to notice that some of our containers are stuck at booting up, more specifically they stuck at the first attempt to run any npm ... commands in that startup script.
After further invistigation we found that rebuild the images in quay seems to be able to get rid of the problem, but just temporarily. After 7 days, the same image will get stuck again at the first attempt to run any npm ... commands
Our older images, those who were still using npm 6, does not have any similar issues
So basically right now we are scratching our heads trying to figure out why is this happening. Any insight on this matter is appreciated
Current Behavior:
Run an example startup script when docker container is spinning up
#!/bin/bash
node --version
npm config list --loglevel verbose <--- will hang forever at here
node --version
npm version
Output
v14.16.0
npm verb cli [
npm verb cli '/usr/bin/node',
npm verb cli '/usr/bin/npm',
npm verb cli 'config',
npm verb cli 'list',
npm verb cli '--loglevel',
npm verb cli 'verbose'
npm verb cli ]
npm info using npm@7.9.0
npm info using node@v14.16.0
npm timing config:load:defaults Completed in 4ms
npm timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 2ms
npm timing config:load:builtin Completed in 2ms
npm timing config:load:cli Completed in 3ms
npm timing config:load:env Completed in 2ms
npm timing config:load:file:/data-portal/.npmrc Completed in 0ms
npm timing config:load:project Completed in 1ms
npm timing config:load:file:/root/.npmrc Completed in 1ms
npm timing config:load:user Completed in 1ms
npm timing config:load:file:/usr/etc/npmrc Completed in 1ms
npm timing config:load:global Completed in 2ms
npm timing config:load:cafile Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:setUserAgent Completed in 1ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 17ms
npm verb npm-session 2de562b7ad69b05f
npm timing npm:load Completed in 30ms. <--- stuck at here forever
Expected Behavior:
npm commands should not hang
Steps To Reproduce:
Really not sure if it is easy to reproduce by you because on our end this issue will only happen on images that has been build 1 week before or older. But please let me know if there is anything I can help with you in order to verify this issue.
Environment:
- OS: Ubuntu 20.04
- Node: 14.16.0
- npm: 7.9.0