Reputation: 2004
I am getting the following error using the Ionic Command in VS Devops since yesterday. In the logs the only difference is that the VSTS hosted command is now using Ionic 4.3.0
by default which was released yesterday.
2018-11-01T16:45:56.7262388Z > ng run app:ionic-cordova-build:production --platform=browser 2018-11-01T16:45:56.7687163Z 'ng' is not recognized as an internal or external command, 2018-11-01T16:45:56.7818095Z [WARN] Not installing--here's how to install manually: npm i -D -E @angular/cli 2018-11-01T16:45:56.7818217Z operable program or batch file. 2018-11-01T16:45:56.7818642Z 2018-11-01T16:45:56.7818698Z [INFO] Looks like @angular/cli isn't installed in this project. 2018-11-01T16:45:56.7818753Z 2018-11-01T16:45:56.7818815Z
This package is required for this command to work properly. 2018-11-01T16:45:56.7818842Z 2018-11-01T16:45:56.7818897Z --no-confirm: Install @angular/cli? No 2018-11-01T16:45:56.7818924Z 2018-11-01T16:45:56.7819462Z [ERROR] @angular/cli is required for this command to work properly. 2018-11-01T16:45:56.9840907Z ##[error]Task failed 2018-11-01T16:45:56.9865809Z ##[section]Finishing: Ionic Command cordova build browser --prod
To prove a point I have run a previous build that ran successfully yesterday and is now failing today.
@angular/cli
is in the package.json
file. I have also added another npm task to manually install @angular/cli before the Ionic Command runs and I still get the same error.
I originally thought this might be because our packages were out of date but I have updated to Ionic 4.3.0 locally and all builds correctly without issue.
Any help would be appreciated.
Upvotes: 2
Views: 994
Reputation: 2004
So I have got this working for now with a hack, which I think should not be possible.
I created a separate build task to install the @angular/cli
package but this time with the -g
flag install i -g -E @angular/[email protected]
This in itself seems like a problem to me as on other build processes I have not been able to do this as it requires higher privileges such as root user in Azure Devops.
So I think this means I have privileges I shouldn't have on the build VM.
Upvotes: 1