Migrate Node.js projects in Visual Studio
Starting in Visual Studio 2022 version 17.7 Preview 1, you can convert existing projects based on the older Node.js project system (.njsproj) to the new JavaScript project system (.esproj). By migrating the project, you can benefit from project system updates such as npm dependency management, unit testing support, and launch config settings.
To migrate from a Node.js project to a JavaScript project:
Right-click the project node for your Node.js project. You should see one of two options: Convert to New JavaScript Project Experience or Convert to New TypeScript Project Experience. Select the available option to migrate your project to the new project system.
After you choose Convert, a conversion log text file gets created and then it opens. The log file details the steps that occurred during the migration.
If anything goes wrong during the migration, you can choose the Revert Project to Old Experience option so that the conversion will be reverted. If you encounter any problem during this process, please the Report a problem feature in Visual Studio.