简体   繁体   English

如何使用 .net 核心项目将 npm 包添加到 visual studio 2019 中?

[英]How do I add npm packages into visual studio 2019 with .net core project?

I am using react for front end along with .net core in backend.我在前端使用 React,在后端使用 .net 核心。 I am told to to use visual studio 2019 to work with .net core and this is the first time I am using visual studio.我被告知要使用 visual studio 2019 来处理 .net 核心,这是我第一次使用 visual studio。 I installed react + redux template and I am wondering how can I add npm packages such as react-table or @material-ui/core in my project?我安装了 react + redux 模板,我想知道如何在我的项目中添加 npm 包,例如react-table@material-ui/core Can I just straight add to dependencies inside package.json file like "@material-ui/core": "version" and will it automatically install when I save?我可以直接添加到 package.json 文件中的dependencies项,如"@material-ui/core": "version"并且它会在我保存时自动安装吗? And also how do I uninstall npm packages as well?还有如何卸载 npm 包?

To install npm packages into your project just simply use要将 npm 包安装到您的项目中,只需简单地使用

npm install <package name>

To uninstall you use要卸载你使用

npm uninstall <package name>

You need to use these commands within the terminal.您需要在终端中使用这些命令。 You can open a integrated terminal window in vscode: https://code.visualstudio.com/docs/editor/integrated-terminal可以在vscode中打开一个集成终端window: https://code.visualstudio.com/docs/editor/integrated-terminal

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 javascript 文件添加到 Visual Studio Community 2019 typescript 项目 - How add javascript files to Visual Studio Community 2019 typescript project asp.net core 中的 JavaScript 在 Visual Studio 2019 中反应 redux 项目 - JavaScript in asp.net core react redux project in Visual Studio 2019 如何在 Visual Studio Code 中运行 npm 命令? - How do I run npm command in Visual Studio Code? 如何将 SVG 文件添加到 Visual Studio Code 中的 React 项目? - How do I add an SVG file to a React project in Visual Studio Code? 努力在 Visual Studio 上加载一个.Net 核心项目和一个 React js 项目 - Struggling loading a .Net core project and a React js project on Visual studio 如何在 Visual Studio React 项目中使用纱线代替 npm? - How to use yarn instead of npm in Visual Studio React project? Visual Studio 2019 中的默认 ASP.NET Core + React 模板不起作用 - The default ASP.NET Core + React template in Visual Studio 2019 doesn't work 构建 ASP.NET Core 项目时如何自动安装 npm 模块 - How to auto install npm modules when I build ASP.NET Core project 在 Visual Studio 2022 中使用 ASP.NET Core 和 React (TypeScript) 创建一个(基于 .NET 6 的)网站项目? - Creating a (.NET 6 based) website project with ASP.NET Core and React (TypeScript) in Visual Studio 2022? Visual Studio 2019 的 React Redux 项目模板,JavaScript 问题 - React Redux Project template by Visual Studio 2019, JavaScript question
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM