关于NETCore发布到IIS 时遇到的一个问题
关于NETCore发布到IIS
第一次发布Core项目时显示No executable found matching command "npm"
显示npm命令不存在,一时间摸不着头脑,从网上查看如何安装npm,从而找到解决方案。
基本步骤首先我安装了nodejs,然后打开nodejs命令行工具,
输入以下内容
node cli.js install npm -gf 其中-gf表示全局安装的意思。在黑窗体中运行npm显示一下内容表示安装成功:
当我再次执行dotnet publish又显示
No executable found matching command "bower"
No executable found matching command "gulp"
于是利用npm可以实现上面两个命令的安装:
npm install -g bower
npm install -g gulp
此时再执行发布命令,就没有问题了。
具体的发布步骤可以参考:https://docs.asp.net/en/latest/publishing/iis.html