使用Visual Studio在一个带有ASP.NET Core项目的React中查看npm输出。

huangapple go评论61阅读模式
英文:

View npm output on a react with ASP.NET Core project using Visual Studio

问题

我用 Visual Studio 创建了一个使用 React.js 的 ASP.NET Core 项目。
运行项目时,我想在 Visual Studio 的任何输出窗口中找到 npm 的输出,但找不到。

我理解 npm 作为中间件以代理服务方式运行:
spa.UseReactDevelopmentServer(npmScript: "start");

但我如何检查 npm 的输出?

英文:

I created an ASP.NET Core with React.js project using Visual Studio.
When running the project, I want to see output from npm, but can't find it from any output window from Visual Studio.

使用Visual Studio在一个带有ASP.NET Core项目的React中查看npm输出。

I understand that npm is ran as a proxy service as a middleware from:

spa.UseReactDevelopmentServer(npmScript: "start");

But how can I check the output from npm?

答案1

得分: 0

你必须安装 Node.js 开发工作负载以获取 npm 支持。

在 Visual Studio 中,选择 工具 -> 获取工具和功能,选择 Node.js 开发,然后点击 修改

然后参考此文档以添加 npm 支持:在 Visual Studio 中管理 npm 包

然后你会在输出窗口中看到 npm 选项。

英文:

You must have the Node.js development workload installed for npm support.

In Visual Studio, select Tools -> Get Tools and Features, select Node.js development and then click Modify.

使用Visual Studio在一个带有ASP.NET Core项目的React中查看npm输出。

Then refer to this document to add npm support: Manage npm packages in Visual Studio.

Then you can see npm option in output windows:
使用Visual Studio在一个带有ASP.NET Core项目的React中查看npm输出。

Is this what you want?

huangapple
  • 本文由 发表于 2023年4月11日 05:24:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/75980848.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定