CI suddenly started failing, but tasks run successfully if I SSH into the container

ssh
nodejs

#1

My master branch passed CI several weeks ago (https://circleci.com/gh/winsleague/winsleague/1001), but now the exact same build suddenly started failing with a weird JavaScript error (https://circleci.com/gh/winsleague/winsleague/1005).

However, if I SSH into the container and run my CI commands manually, everything works fine.

Another interesting thing is in one of my pull request branches, I’m requesting Node 8.8.1 and can see that it installs. When CI prints “node -v”, it correctly prints 8.8.1. But if I SSH into the build, “node -v” returns 4.2.6. Why the discrepancy?


#2

I’d guess you have both versions installed, but SSH/rescue mode has a modified PATH that prioritises a different binary. I would suggest doing which node in a run step and in SSH, and see if it is different. If it is, hardwire the run command to the path you want.


#3