No executable found matching command "bower" #3293

GonzRu opened this Issue May 31, 2016 · 7 comments


None yet

7 participants

GonzRu commented May 31, 2016

Steps to reproduce

Create new ASP.NET Core Web Application. Try to publish from cmd/powershel with "dotnet publish". After this i got such error: No executable found matching command "bower".

How can i fix this?

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-002900)

Product Information:
Version: 1.0.0-preview2-002900
Commit SHA-1 hash: f4ceb1f

Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64


I have a same issue but publishing with visual studio successfully.

GonzRu commented Jun 1, 2016

@emrahtokalak i solved the problem.
need to install bower and gulp(if you use it) as a global packages
npm install -g bower
npm install -g gulp

@GonzRu GonzRu closed this Jun 1, 2016
ahumeniy commented Jul 1, 2016

On the new website template for Visual Studio NPM is not included so the solution posted by @GonzRu won't work.

The solution is to add the path to the VS web tools to the PATH environment variable. Run this in package manager:

$env:path = $env:path + ";C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External"

dotnet build should run fine now.


And how to get bower and gulp on Win Server environment without VS installed?
Should I install nodejs manually and then get both packeages as @GonzRu suggested?

pavram commented Aug 11, 2016

I can't answer @valamelkor's question, but as an addendum to @ahumeniy's comment:

[Environment]::SetEnvironmentVariable("Path", $env:path + ";C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External", [EnvironmentVariableTarget]::Machine)

Will permanently add the path to the environment variable, instead of temporarily.

redwards510 commented Aug 11, 2016 edited

@valamelkor I feel your pain. I am trying to get dotnet publish to work on a TeamCity build server. The problem with @GonzRu solution is that npm installs bower to your personal AppData directory, which is a terrible idea for a build server. Try this instead on your build server box (and agents!):

  1. mkdir c:\npm
  2. npm install bower -g --prefix c:\npm
  3. add c:\npm to your PATH variable
  4. reboot

You may want to install gulp while you are at it.


Installing the latest version of nodejs (via msi from their official site) solved the problem for me. Installing bower and gulp globally without updating to latest nodejs version didn't worked for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment