Ionic build ios --prod Not creating new www folder

I am not able to understand, ionic build android --prod created www folder properly before on WIndows,
but as of now i build my same project using IOS platform on Mac, i am trying to run ionic build ios --prod but www folder not getting created or not replacing previous files with changed ones.

As a solution, i tried cordova prepare ios and then ionic build ios --prod, as per forum and stackoverflow answers, but still NO LUCK…
Any Idea guys? Help will be Appreciated …

What is happening instead? What is the output on the CLI?

Build command showing as build successful…But not generating www folder, so not able to get updated code in main.js …

What does that mean?
The folder does not exist?
Or it doesn’t get updated?
WHat happens if you delete its content?

You can also use npm run build --prod first to see what is happening in the build isolated.

Yes, i deleted www folder and again ran ionic build ios command still it doesnt get created again… But command shows to be successfully executed.

Okay i will try npm run build --prod

Post your ionic info output please.

You have no Cordova CLI installed - so the build commands can’t work.
You have an ancient version of the Ionic CLI installed. Upgrade to at least 2.2.3 or even better 3.0.0.

Okay. I will install Cordova cli and will update Ionic cli version. :slight_smile:

After i use command sudo ionic info i get this info, where there is cordova cli showing as installed…

Ok, then something is messed up with permissions. I don’t know anything about that.

Cordova CLI is still quite old - current version is 7 :wink: (or at least 6.5.0 last stable one before that)

Nothing is helping, not even after updating CLI’s .
Still i ran command sudo ionic build ios --prod , to get rid of permissions related issues.
Still NO LUCK… :pensive:

If I were you I would just uninstall Cordova, Ionic, Node and NPM and start anew. Use nvm so you can install several different node versions, then add current versions of Cordova (7.0) and Ionic CLI (3.0). Then maybe even start a new project and import your code - or just try check out your current project again from Git (or whatever source control you are using) again in a new folder.

Something is rotten in the current setup, and it won’t get better by itself.

Sir, I have tried uninstalling and installing ionic & cordova a several times, but problems still exists.
I will check out new project using svn and will try installing everything from scratch again.
I will let you know! :slight_smile:
I am just wondering that, i haven’t installed ios-sim & ios-deploy on my mac, is that creating build problem?

I don’t know.

The most important part of my advice was to deinstall node and npm and then reinstall it, best using nvm. Then you don’t need to use any sudo anywhere and it is a much cleaner installation in general.