'Node projects are not working after changing the node version

I have node version 14 and all my node projects are working fine in node 14, but when I installed node version 16 and trying to run existing node projects, existing node projects are not running and I'm getting an error as '.' is not recognized as an internal or external command operable program or batch file.

Please find the below image for reference.

Error Message

I already checked the node path in environment variables, and it's correct.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source