Skip to content

Commit cfc682a

Browse files
Merge pull request #15503 from MicrosoftDocs/main
Auto Publish – main to live - 2026-06-15 22:00 UTC
2 parents 96165d7 + b4458c8 commit cfc682a

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

25.8 KB
Loading
18.5 KB
Loading

docs/javascript/npm-package-management.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Manage npm packages for Node.js and ASP.NET Core projects
33
description: Manage packages in Visual Studio by using the Node.js package manager (npm) for both Node.js and ASP.NET Core applications.
4-
ms.date: "2/11/2025"
4+
ms.date: "6/15/2026"
55
ms.topic: "how-to"
66
ms.devlang: javascript
77
author: "mikejo5000"
@@ -16,30 +16,37 @@ dev_langs:
1616
npm allows you to install and manage packages for use in both Node.js and ASP.NET Core applications. Visual Studio makes it easy to interact with npm and issue npm commands through the UI or directly. If you're unfamiliar with npm and want to learn more, go to the [npm documentation](https://docs.npmjs.com/).
1717

1818
Visual Studio integration with npm is different depending on your project type.
19+
1920
::: moniker range=">=vs-2022"
2021
* [CLI-based projects (.esproj)](#cli-based-project-esproj)
2122
* [ASP.NET Core](#aspnet-core-projects)
2223
* [Open folder (Node.js)](../javascript/develop-javascript-code-without-solutions-projects.md)
2324
::: moniker-end
2425

25-
2626
> [!IMPORTANT]
2727
> npm expects the *node_modules* folder and *package.json* in the project root. If your app's folder structure is different, you should modify your folder structure if you want to manage npm packages using Visual Studio.
2828
29-
::: moniker range=">=vs-2022"
3029
## CLI-based project (.esproj)
3130

3231
Starting in Visual Studio 2022, the npm package manager is available for [CLI-based projects](../javascript/javascript-in-vs-2022.md#project-templates), so you can now download npm modules similarly to the way you download NuGet packages for ASP.NET Core projects. Then you can use *package.json* to modify and delete packages.
3332

3433
To open the package manager, from Solution Explorer, right-click the **npm** node in your project and choose **Add npm package**.
3534

36-
:::image type="content" source="../javascript/media/vs-2022/npm-packages-open-manager-esproj.png" alt-text="Open package manager from Solution Explorer" border="true":::
35+
::: moniker range="visualstudio"
36+
:::image type="content" source="../javascript/media/visualstudio/npm-packages-open-manager-esproj.png" alt-text="Screenshot of opening package manager from Solution Explorer." border="true":::
37+
::: moniker-end
38+
::: moniker range="vs-2022"
39+
:::image type="content" source="../javascript/media/vs-2022/npm-packages-open-manager-esproj.png" alt-text="Screenshot of opening package manager from Solution Explorer." border="true":::
40+
::: moniker-end
3741

3842
Next, you can search for npm packages, select one, and install by selecting **Install Package**.
3943

40-
:::image type="content" source="../javascript/media/vs-2022/npm-packages-install-esproj.png" alt-text="Install new npm package for esproj" border="true":::
44+
::: moniker range="visualstudio"
45+
:::image type="content" source="../javascript/media/visualstudio/npm-packages-install-esproj.png" alt-text="Screenshot of installing new npm package for esproj." border="true":::
46+
::: moniker-end
47+
::: moniker range="vs-2022"
48+
:::image type="content" source="../javascript/media/vs-2022/npm-packages-install-esproj.png" alt-text="Screenshot of installing new npm package for esproj." border="true":::
4149
::: moniker-end
42-
4350

4451
## ASP.NET Core projects
4552

@@ -56,8 +63,8 @@ If your project does not already include a *package.json* file, you can add one
5663

5764
```json
5865
"devDependencies": {
59-
"gulp": "4.0.2",
60-
"@types/jquery": "3.5.29"
66+
"gulp": "5.0.1",
67+
"@types/jquery": "4.0.1"
6168
}
6269
```
6370

0 commit comments

Comments
 (0)