Skip to content

soldair/npm-are-you-sleeping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-are-you-sleeping

A helpful script to restart npm if its hung in ci.

replace calls to npm install

npx npm-are-you-sleeping 

or if you want a particular number of timeouts

npx npm-are-you-sleeping 10000 5 install

this is a dependency free single js file so if you want to install it with curl....

curl ...todo npm cdn url.../npm-are-you-sleeping/index.js > sleeping.js && sleeping.js ....

USE

npm-are-you-sleeping <idle timeout in ms> <number of attempts> [npm command]

This runs npm. Waits for it to not output anything on stdout or stderr for timeout ms. If it has remaining attempts it'll signal the old process and try again.

if you have 100s of builds like we do these errors have really started stacking up lately. This seems to work for us so far =)

SPECIAL MENTIONS

Inspired by Eddy cat who likes to check to see if @zkat is sleeping

PICTURE OF EDDY CAT

NOTES

This is not an official Google product.

About

A helpful script to restart npm if its hung in ci

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published