# Npm run build does not make web assets directory ./www

**URL:** <https://forum.ionicframework.com/t/npm-run-build-does-not-make-web-assets-directory-www/214052>\
**Category:** Ionic React\
**Created:** [August 21, 2021, 12:39am UTC](https://forum.ionicframework.com/t/npm-run-build-does-not-make-web-assets-directory-www/214052 "2021-08-21T00:39:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![filifunk](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@filifunk](https://forum.ionicframework.com/u/filifunk)\
**Post date:** [August 21, 2021, 12:39am UTC](https://forum.ionicframework.com/t/npm-run-build-does-not-make-web-assets-directory-www/214052/1 "2021-08-21T00:39:38Z")

</div>

Hi I had built an android app in android studio for Google play (a beta version). I made some changes to my code and am trying to upload a new version of the app to Google Play.

I try to do a `ionic capacitor build android` and I get this error:

Could not find the web assets directory: ./www.  
Please create it and make sure it has an index.html file. You can change  
the path of this directory in capacitor.config.json (webDir option). You  
may need to compile the web assets for your app (typically npm run  
build). More info:  
[Capacitor - build cross platform apps with the web](https://capacitorjs.com/docs/basics/workflow#sync-your-project)

Other threads related to this say I should run a `npm run build.` This does not solve my problem. I followed the link for “more info” and don’t really know how it helps. If no one knows the way to solve my issue, can someone point me to a tutorial on what the ./www assets are for and what they do?

Thanks.

---

<div class="post-metadata">

**Author:** ![codehelper](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@codehelper](https://forum.ionicframework.com/u/codehelper)\
**Post date:** [August 25, 2021, 7:30am UTC](https://forum.ionicframework.com/t/npm-run-build-does-not-make-web-assets-directory-www/214052/2 "2021-08-25T07:30:15Z")

</div>

Hi,

Not sure if this works or not but give it a try.

→ Take a backup of your code first.

→ Go to capacitor.config.ts

change **webDir : 'www’**

→ Run the command: **Ionic build**

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [August 25, 2021, 10:55am UTC](https://forum.ionicframework.com/t/npm-run-build-does-not-make-web-assets-directory-www/214052/3 "2021-08-25T10:55:20Z")

</div>

Ionic now supports multiple frameworks and every framework uses a different folder. www is used for angular, is your app an angular app?

---

<div class="post-metadata">

**Author:** ![filifunk](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@filifunk](https://forum.ionicframework.com/u/filifunk)\
**Post date:** [August 26, 2021, 11:45pm UTC](https://forum.ionicframework.com/t/npm-run-build-does-not-make-web-assets-directory-www/214052/4 "2021-08-26T23:45:05Z")

</div>

React app! I changed it to `build` instead of `www` and it works because React builds into `build` and not `www`. Thanks!

---

<div class="post-metadata">

**Author:** ![filifunk](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@filifunk](https://forum.ionicframework.com/u/filifunk)\
**Post date:** [August 26, 2021, 11:45pm UTC](https://forum.ionicframework.com/t/npm-run-build-does-not-make-web-assets-directory-www/214052/5 "2021-08-26T23:45:37Z")

</div>

I just had to change it to `build` instead of `www` in the config file and it works because I am making a React app.

---

<div class="post-metadata">

**Author:** ![luisSancho1234](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@luisSancho1234](https://forum.ionicframework.com/u/luisSancho1234)\
**Post date:** [August 6, 2024, 7:56pm UTC](https://forum.ionicframework.com/t/npm-run-build-does-not-make-web-assets-directory-www/214052/6 "2024-08-06T19:56:03Z")

</div>

I have solved changing the path of webDir atribute in capacitor.config.json to the src folder.

webDir: ‘./src’
