Create an NVM Config File
NVM supports a configuration file; the most basic file would declare your Node version of choice. Assuming you're using that Node version, here's a foolproof method to create such a file:
$ node -v > .nvmrc
I ran this in a project I'm working on, and it exposed a syntax issue with my
.nvmrc; I had initially typed
9.2 instead of
v9.2.0, the syntax NVM expects. This command eliminates errors like these.