'Problems with Azure DevOps-pipeline to create android-cordova-app

I have a problem with the build-pipelines in Azure DevOps. I try to create an Android-app with cordova.

The pipeline fails with following command: cordova platform add android

The following error message appears:

No scripts found for hook "before_platform_add". [Error: ENOENT: no such file or directory, open 'D:\a\1\s\android\package.json'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'D:\a\1\s\android/package.json' }

Node-version: 16.13.2

Cordova-version: 11.0.0

I already deleted the file package_lock.json and remove the android-platform first before adding again.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source