-
Notifications
You must be signed in to change notification settings - Fork 653
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
Cannot read property 'indexOf' of null on Cordova commands #815
Comments
This is the output of "ionic info".
|
Thanks! Was this error on an existing project? And if so, had you updated node from the time you started the project? Someone suggested that it was related to node v5.7.0. |
Yes, this problem has probably started to occur with the Node v5.7.0 update. I don't remember exactly when I updated my Node, but I upgrade my tools quite often. And in my case, the error occurs in an existing project created months ago. New projects don't seem to suffer from similar symptoms. I did test it, and new projects added iOS platform with no problems with the tool set that failed to add iOS platform to my existing project. I got around this issue temporarily by downgrading my Node to v5.4.0 using NVM, so it seems quite obvious the problem lies in Node v5.7.0. This is not the original error message, but I replicated the original scenario by reverting back to Node v5.7.0 (nvm deactivate). Then adding iOS platform results the following error message:
|
I'm facing this issue as well, I'm running on node
This happens on existing project. The project was working fine before. I did try re-cloning my git repo and adding the platform again, but it give the same result. |
Hmm, still not able to reproduce. Does running |
Yes, it also fails to run.
|
Looks like this is a Node bug, to be fixed in 5.7.1: https://issues.apache.org/jira/browse/CB-10675 Going to close as it's not an Ionic issue, but please feel free to post here if you're still having issues, thanks! |
Thanks, Tim! |
I first face this issue when my info were: Cordova CLI: 6.0.0 Upgrading node to 5.7.1 does not change the situation, so I'm a little bit confused now. EDITED: Something useful that i've found is that the trouble, in my case, is related to the presence of the iOS platform. Removing it makes the android composition works just fine again. |
upgrading does not fix this. project was working, randomly stopped. I used NVM to jump between several versions of node, none of which worked. This is totally messed up, cannot compile at all, and I've been working fine for months. I tried removing and adding the platform. nope. |
Same issue, and I tried everything that @vance said. |
@moneytree-doug me too |
I had this issue when there was a problem in the config.xml file - we'd left out the * following file in the following statement
|
Ionic platforma add android Your system information: Cordova CLI: 6.0.0 ERROR: Upgrade warning - for the CLI to run correctly, Please update your Cordova CLI to version >=4.2.0 Updated the hooks directory to have execute permissions |
I'm getting the same error as the user above me. Any idea how to fix this? |
To solve this problem just move all |
None of this has worked for me.
|
Having issue as well:
|
I fixed this by removing the lines that were being automatically added to my config.xml such as |
To me my config.xml was emtpy so I fixed it and the problem is gone |
Fixed it by removing this line: |
Confirming that this fixed the issue for me, which manifested when trying to launch iOS emulator and adding cordova plugins |
Fixed by removeing |
https://forum.ionicframework.com/t/error-adding-ios-platform-error-indexof-undefined-solved/45234
https://forum.ionicframework.com/t/getting-error-while-adding-platform-ios-in-ionic/41657
http://stackoverflow.com/questions/35747292/ionic-cli-error-error-cannot-read-property-indexof-of-null-on-terminal
The text was updated successfully, but these errors were encountered: