# OWA Yeoman Generator Webpack Error

**URL:** <https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836>\
**Category:** Software\
**Tags:** javascript\
**Created:** [November 28, 2016, 3:14am UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836 "2016-11-28T03:14:55Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![missilen](https://talk.openmrs.org/letter_avatar/missilen/32/5_5575768a8748004e209b776fc1b2916d.png) [@missilen](https://talk.openmrs.org/u/missilen)\
**Post date:** [November 28, 2016, 3:14am UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/1 "2016-11-28T03:14:55Z")

</div>

Hello, I have been trying to use this release (webpack) to generate an owa and install it to refapp 2.5 but it seems that it does not generated the necessary files to correctly install it. I tried both build:deploy and build:production.

build deploy copied the webpack files to the owa directory but app structure was not there. same thing for the zip file generated.

In either case, the app did not show up in the owa app management screen. Am is missing something?

Thanks, Tim

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [November 28, 2016, 6:35am UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/2 "2016-11-28T06:35:29Z")

</div>

> [@missilen](#):
>
> build deploy copied the webpack files to the owa directory but app structure was not there

I’m not clear on exactly what you mean by this? Can you show us the directory structure you get, and tell us exactly what you are expecting instead?

Also, can you upload the contents of your `webpack.config.js` file to pastebin.com or pastie.org and share the link here?

Lastly, how are you running OpenMRS? Are you using the standalone? SDK? Enterprise?

---

<div class="post-metadata">

**Author:** ![missilen](https://talk.openmrs.org/letter_avatar/missilen/32/5_5575768a8748004e209b776fc1b2916d.png) [@missilen](https://talk.openmrs.org/u/missilen)\
**Post date:** [November 28, 2016, 2:32pm UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/3 "2016-11-28T14:32:28Z")

</div>

Hi, thank you for getting back. I was using refapp 2.5 stand-alone version. According to the documentation, the build:deploy should deploy the owa to local server but you could see that the app’s structure was not there.

 ![](https://talk.openmrs.org/uploads/default/original/2X/2/2e48c51bc2e709b7ce391a8493c1525dbaed96e9.png)

below is the webpack config file’s link [http://pastie.org/10971827](http://pastie.org/10971827)

Thanks

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [November 28, 2016, 4:25pm UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/4 "2016-11-28T16:25:54Z")

</div>

Based on your `webpack.config.js` ([line #55](http://pastie.org/10971827#55)), when you do a local deploy, the app will be copied to `C:/Users/tsmith/Downloads/openmrs-standalone-2.5/appdata/owa/`. Is this the same directory you are showing in the screenshot?

I see three apps in your screenshot, and the structure of the `hivviralload` app looks correct to me. The reason the file structure is different than the source is because the JavaScript files are concatenated (and minified/uglified) during the production build. This is the expected behaviour (see [`webpack.config.js#67`](http://pastie.org/10971827#67)).

Can you show the list Manage Apps page of the OWA Module? Also, can you build the ZIP file and deploy the app using the Manage Apps page and then upload the Tomcat log to pastie.org?

---

<div class="post-metadata">

**Author:** ![missilen](https://talk.openmrs.org/letter_avatar/missilen/32/5_5575768a8748004e209b776fc1b2916d.png) [@missilen](https://talk.openmrs.org/u/missilen)\
**Post date:** [November 28, 2016, 4:40pm UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/5 "2016-11-28T16:40:25Z")

</div>

Hi, the zip file got the same structure as deploy-local. when I tried to upload the app from Manage App Screen, i got error message : “Manifest file could not be found in app”

 ![](https://talk.openmrs.org/uploads/default/original/2X/f/f77e95cb38eec3847c3eaa34aaab19af6ba4f61c.png)

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [November 28, 2016, 5:15pm UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/6 "2016-11-28T17:15:16Z")

</div>

Can you either share your ZIP file, or confirm that it contains a file called `manifest.webapp` in the root? Can you also share your Tomcat log and show us the output you get when you run `npm run build:prod`?

What version of the OWA Module are you running?

---

<div class="post-metadata">

**Author:** ![missilen](https://talk.openmrs.org/letter_avatar/missilen/32/5_5575768a8748004e209b776fc1b2916d.png) [@missilen](https://talk.openmrs.org/u/missilen)\
**Post date:** [November 28, 2016, 7:11pm UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/7 "2016-11-28T19:11:28Z")

</div>

sorry, i missed the last part. I believe the version of owa is 1.6.3 that came with the reference app 2.5

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [November 28, 2016, 8:11pm UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/8 "2016-11-28T20:11:26Z")

</div>

> [@pascal](#):
>
> Can you either share your ZIP file, or confirm that it contains a file called manifest.webapp in the root? Can you also share your Tomcat log and show us the output you get when you run `npm run build:prod`?

☝ Can you provide us with these?

---

<div class="post-metadata">

**Author:** ![missilen](https://talk.openmrs.org/letter_avatar/missilen/32/5_5575768a8748004e209b776fc1b2916d.png) [@missilen](https://talk.openmrs.org/u/missilen)\
**Post date:** [November 28, 2016, 9:33pm UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/9 "2016-11-28T21:33:29Z")

</div>

Hi, I sent the files to OpenMRS Talk so I guess it did not go through so here they are

 ![](https://talk.openmrs.org/uploads/default/original/2X/8/8080eff56302f22b9634df59c47fcf6032b2362c.png)

what is the best way to send the zip file? I do not know how to use pastebin.

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [November 29, 2016, 12:43am UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/10 "2016-11-29T00:43:08Z")

</div>

The problem was a bug in an outdated Webpack plugin. I fixed it and released a new version (`v0.3.2`). You’ll need to update the generator (`npm install -g generator-openmrs-owa`) and re-scaffold your app.

Let me know if this works.

---

<div class="post-metadata">

**Author:** ![missilen](https://talk.openmrs.org/letter_avatar/missilen/32/5_5575768a8748004e209b776fc1b2916d.png) [@missilen](https://talk.openmrs.org/u/missilen)\
**Post date:** [November 30, 2016, 2:08am UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/11 "2016-11-30T02:08:45Z")

</div>

Hi, the “prod” still produced the zip file with same webpack files and there was no changes for the “deploy” option (no app structure copied over to the local owa folder.

Tim

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [November 30, 2016, 2:57am UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/12 "2016-11-30T02:57:00Z")

</div>

Regarding the directory structure, see my comment above:

> [@pascal](#):
>
> I see three apps in your screenshot, and the structure of the `hivviralload` app looks correct to me. The reason the file structure is different than the source is because the JavaScript files are concatenated (and minified/uglified) during the production build. This is the expected behaviour (see [webpack.config.js#67](http://pastie.org/10971827#67)).

The files are packed for the web, which is correct.

Does the app still not show up on your _Manage Apps_ page? Do you still see the same error when you try to upload the ZIP file?

---

<div class="post-metadata">

**Author:** ![missilen](https://talk.openmrs.org/letter_avatar/missilen/32/5_5575768a8748004e209b776fc1b2916d.png) [@missilen](https://talk.openmrs.org/u/missilen)\
**Post date:** [November 30, 2016, 3:09am UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/13 "2016-11-30T03:09:59Z")

</div>

Pascal, thank you for helping with this. I was able to upload the zip file with no error. the only thing needed was the app definition and it worked!!

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [November 30, 2016, 3:16am UTC](https://talk.openmrs.org/t/owa-yeoman-generator-webpack-error/8836/14 "2016-11-30T03:16:48Z")

</div>

Sure, no problem. The `manifest.webapp` file wasn’t getting copied to the `dist` folder, which is what I fixed in the `v0.3.2` release.

To speed up your development cycle, consider running `npm run watch`. This will watch your files for changes and automatically redeploy when a change is detected. To manually deploy, running `npm run build:deploy` is the best option. Uploading the ZIP file is the most manual, and hence the slowest.
