`\r\n` in `.node-version`

For several days, I‘ve been troubled by such an error. It works in my other projects, but only this complaint:

11:10:26 PM: Attempting Node.js version '20
' from .node-version
11:10:26 PM: Version '20
' not found - try `nvm ls-remote` to browse available versions.
11:10:26 PM: Failed to install Node.js version '20
'

Today I finally found the reason. This is my .node-version:

20

ends with \r\n.

After replacing \r\n with \n, it was solved.

Considering that this inconspicuous problem may trouble more people, could Netlify automatically replace line breaks during the Initialize Step?

We’d likely not want to edit users’ codebase. While it might make sense given your issue, I’m not sure if that’s a good idea for us in general even if it’s as minor as this.

I’ll still file it, but I don’t expect anything to change in this area.