5
In your package.json under scripts you need to add preinstall script which will execute preinstall scripts every time you do npm install
,
as follow:
"scripts": {
"preinstall": "npm i -g @vue/cli @vue/cli-service-global"
}
Source:stackexchange.com