parthas-MacBook-Pro:App parthpratim$ ionic cordova resources --verbose
[DEBUG] Loading global plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for global @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-cordova
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
[DEBUG] resourceJsonStructure=3
[DEBUG] platformDirContents=
[DEBUG] buildPlatforms=
✔ Collecting resource configuration and source images - done!
[DEBUG] !!! ERROR ENCOUNTERED !!!
[ERROR] No platforms have been added. Please run: ionic cordova platform add
What files and folders do you have in /platforms
?
(This is just a hunch:
Did you ever run something with sudo
to create or install in this project?
Can you try running sudo ionic cordova resources --verbose
please?)
platforms folder is not generating like old app.
Same result on sudo ionic cordova resources --verbose
parthas-MacBook-Pro:App parthpratim$ sudo ionic cordova resources --verbose
Password:
[DEBUG] Loading global plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for global @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-cordova
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
[DEBUG] resourceJsonStructure=3
[DEBUG] platformDirContents=
[DEBUG] buildPlatforms=
✔ Collecting resource configuration and source images - done!
[DEBUG] !!! ERROR ENCOUNTERED !!!
[ERROR] No platforms have been added. Please run: ionic cordova platform add
What does that mean?
Does /platforms
exist?
What is in it?
aka could you share the result of:
ls -ltr platforms/
No its not, there is no /platforms
parthas-MacBook-Pro:App parthpratim$ ls -ltr platforms
ls: platforms: No such file or directory
I now think the “platforms list” data comes from package.json/config.xml and for some reason the project is unable to create the /platforms
folder and/or create files in it. Probably something to do with file permissions.
You should remove all platforms (ionic cordova platform remove android
and same with ios
), manually create the /platforms
folder and re-add the platforms - check if there is stuff generated in /platforms
.
If this doesn’t work, just nuke the whole project from your disk and create a new one or check the project out again.
I have tried the both , yes this project is unable to create /platforms folder, Today morning i have created a new project by running ionic start myApp sidemenu
but still no luck.
Also remove all platforms (ionic cordova platform remove android and same with ios)
and try to install it again. Now i am gonna create /platform folder manually and try to run ionic cordova platform add <platform>
So even on a new project it didn’t create the /platforms
folder?
If this is the case, you have to go nuclear:
Uninstall node, completely. Install nvm
, reinstall a node version via nvm
. Then reinstall Ionic and Cordova, then try again. (using node via nvm
will get rid of lots of permission problems you seem to be having)
yes it didnt create / platforms folder.[quote=“Sujan12, post:30, topic:93486”]
If this is the case, you have to go nuclear:
Uninstall node, completely. Install nvm, reinstall a node version via nvm. Then reinstall Ionic and Cordova, then try again. (using node via nvm will get rid of lots of permission problems you seem to be having)
[/quote]
Thanks i am gonna try nvm
my solution is to create the folder platforms
manually
then rm and add the platform again with the ionic cordova platform
command
Running ionic cordova resources --verbose fixed it so I could remove and re-add ios platform
im also facing problem to add platform in ionic project