Fix test failures.
Add home environment variable and npm install has retries.