How to fix “Could not locate bower” error while migrating from Vaadin 13 to

I am trying to migrate my Vaadin application from 13th version to 14th. I am following the migration guide: https://vaadin.com/docs/v14/flow/v14-migration/v14-migration-guide.html step by step.

Everything is going well till I have to upgrade Polymer2 to Polymer3 following this guide: https://vaadin.com/docs/v14/flow/v14-migration/migration-tool.html

Executing the following command mvn vaadin:migrate-to-p3
returns the com.vaadin.flow.migration.MigrationToolsException: Could not locate bower. Install it manually on your system and re-run migration goal. but I have the bower installed globally and locally.

bower -v returns 1.8.8

This is how my package.json looks like:

{
  "name": "no-name",
  "license": "UNLICENSED",
  "dependencies": {
    "@polymer/polymer": "3.2.0",
    "@webcomponents/webcomponentsjs": "^2.2.10",
    "polymer-modulizer": "^0.4.3"
  },
  "devDependencies": {
    "bower": "^1.8.8",
    "copy-webpack-plugin": "5.0.3",
    "raw-loader": "3.0.0",
    "webpack": "4.30.0",
    "webpack-babel-multi-target-plugin": "2.1.0",
    "webpack-cli": "3.3.0",
    "webpack-dev-server": "3.3.0",
    "webpack-merge": "4.2.1"
  },
  "description": "This project can be used as a starting point to create your own Vaadin Flow application with Spring Boot.\r It contains all the necessary configuration and some placeholder files to get you started.",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "http://git.ws.com.pl:3000/some.git"
  },
  "author": ""
}

Does anyone know how to fix it?