-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrading cordova version from 8.x.x to 9.0.0 cordova build is failing #498
Comments
You may need to also update cordova-android. You can do so by running the following commands: cordova platform remove android The latest cordova-android version as of writing is 8.1.0 |
@breautek |
I wonder if something may have gone wrong on your file system (this happened to me once). I recommend that you try the following:
I do think it would be good if Cordova could make this issue easier to troubleshoot (somehow). |
@brodybits , @breautek Steps to replicate :
Build will be successfull. Now go to app folder and check package.json {
"dependencies": {
"cordova-android": "^8.0.0"
},
"devDependencies": {
"cordova-plugin-whitelist": "^1.3.4"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {}
},
"platforms": [
"android"
]
}
} Next remove platforms, plugins, package.json, package-lock.json, node_modules folders and try to perform step 2 and 3. You will see this issue. It just contains below json {
"devDependencies": {
"cordova-plugin-whitelist": "^1.3.4"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {}
},
"platforms": [
"android"
]
}
} This json is not including dependencies key, whereas build success contains the dependecies key with cordova-android set in it. As dependencies is not in the package.json file, cordova build is failing with error This issue can be avoid by add cordova-android to dependencies in the package.json |
The I think we should update Cordova to check for the required configuration in package.json and show a more useful error message in case it is missing. |
@brodybits |
I solved this problem by upgrading the nodejs version to the latest! |
Thanks google-- I'm here. Failed to instantiate ProjectBuilder builder: Error: Cannot find module 'dot-prop' |
You shouldn't need to manually add any dependencies, but it is possible that you're using an out-dated/unsupported version of The latest CLI is version 10, and the latest cordova-android version is 9.1.0. I'd try first upgrading to the latest CLI and then re-adding the cordova-android platform. If
It's also recommended to use the latest available release of whatever major of Node you're using. Refer to the table below:
Odd major versions of Node (e.g: 11.x, 13.x, 15.x) is not supported. They may or may not work. There doesn't appear to be an actual issue here related to |
Bug Report
On updating the cordova to 9.0.0 version, cordova build is failing with the below error
Problem
Unable to load PlatformApi from platform. Error: Cannot find module 'properties-parser' Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
What is expected to happen?
What does actually happen?
Information
Command or Code
Environment, Platform, Device
Version information
Checklist
The text was updated successfully, but these errors were encountered: