Latest node version not found while building site

Why latest node version is not found even I specified the Node version through .nvmrc file
and still netlify shows Build Error not found the node version (which was the Latest stable version)

12:25:01 PM: Attempting node version ‘��v14.17.3’ from .nvmrc
12:25:02 PM: Version ‘��v14.17.3’ not found - try nvm ls-remote to browse available versions.
12:25:02 PM: Failed to install node version ‘��v14.17.3’
12:25:02 PM: Build was terminated: Build script returned non-zero exit code: 1
12:25:02 PM: Creating deploy upload records
12:25:02 PM: Failing build: Failed to build site
12:25:02 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
12:25:02 PM: Finished processing build request in 5.603147622s

And here is my .nvmrc file content

v14.17.3

does anyone have any idea why this is happening? kindly help me with your ideas & suggestions

Thank you

Latest Node version is 16+ and it needs environment variable to be set as node.

However your problem is probably that you’re prefixing the version number with v. It should only be 14.17.3.

Ok, I have just tried with the latest version of the node and changed the file as you have mentioned. again the Same error occurs,

11:49:40 AM: Attempting node version ‘��16.4.2’ from .nvmrc
11:49:41 AM: Version ‘��16.4.2’ not found - try nvm ls-remote to browse available versions.
11:49:41 AM: Failed to install node version ‘��16.4.2’
11:49:41 AM: Build was terminated: Build script returned non-zero exit code: 1
11:49:41 AM: Creating deploy upload records
11:49:41 AM: Failing build: Failed to build site
11:49:41 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
11:49:41 AM: Finished processing build request in 6.004866872s

And here is my .nvmrc file content

16.4.2

this time I didn’t prefix the v and even If we try the current latest version of the node it’s showing “version” not found.

I think something is going wrong with your file. �� characters are not expected. Maybe you’ve invalid characters in the file?

If it’s still not working, you could set a NODE_VERSION environment variable in UI or netlify.toml with the value node and it’ll always pull the latest version of Node.js.

1 Like

Actually, I have erased my file and Added the version by just typing it, not even copy-pasted.
don’t know why the invalid character adds up before.

ok I hope you are asking to change like this, is that right?

Thank You for the Solution, Changing the Environment variable Solves the error. It worked!