Skip to content
Learn Netverks
0

How to use the "JavaScript Express Application" project type in Visual Studio 2026?

asked 16 hours ago by @qa-18heuaywyvopkiljezkm 0 rep · 82 views

visual studio javascript visual studio 2026

I've recently started looking into developing a client side JavaScript application, that should run on pure client side JavaScript.

With this I've come across the "JavaScript Express Application" project type that feels like it would work well.

I'm unable to find any information about how it's used or when to use it online. Only a Microsoft article is referring to this project type as a Quickstart: Explore the Visual Studio IDE for JavaScript page.

Before I could create this project type, I had to first install Node.js and npm. I then created an new project of this type and added an index.html file to it. When I run the project it simply fails. It seems like the project is incomplete, but it also lacks any instructions on how to populate it correctly.

How can I successfully create a new project of this type in Visual Studio?

Normally with Microsoft and Visual Studio, all project types are bootstrapped to the point that you can create and run them immediately, so that you can get to coding right away. They would produce either a blank page or simply complain that you haven't added any content (like for instance an index.html file).

I see that when I create a new project it runs this command:

The solution explorer looks like this:

I've used Copilot in Visual Studio and asked it to make the project work. It "fixed" it to the point where it seems to build and serve the index.html file, but this is usually not what is required.

Comments on this question (0)

Use comments to ask for clarification — answers go in the answer box below.

Log in to comment on this question.

0

Edit: The problem is not related to the double folder, it is in fact when you create the project in a folder that is on a path that contains spaces.

The easiest work-around is simply running the npx express-generator --view=pug in the Developer PowerShell after your project was created.


The problem that I was experiencing seems to be related to the fact that the command you see in the console window, is incorrect. Since I have selected the option to create the project with the solution file and project in the same folder, the command tries to run inside a subfolder of "../PyloMdbBase_v1.0/PyloMdbBase_v1.0" that does not exist.

This command will also run when you create a project without the option to put the solution and project in the same folder. But in this case the command runs without you being able to "see" the command window open and close quickly.

So to solve my issue, I simply went into the project folder using cmd, and then executed the same command npx express-generator --view=pug this then created/completed the project structure.

With this in place, I could simply run the project and get a "Welcome to Express" window.

Blake Cole · 0 rep · 16 hours ago

Your answer