# OWA Generator and NodeJS 4.x

**URL:** <https://talk.openmrs.org/t/owa-generator-and-nodejs-4-x/18430>\
**Category:** Development\
**Tags:** owa-generator, owa, javascript\
**Created:** [June 11, 2018, 9:17am UTC](https://talk.openmrs.org/t/owa-generator-and-nodejs-4-x/18430 "2018-06-11T09:17:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![danfuterman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/danfuterman/32/10800_2.png) [@danfuterman](https://talk.openmrs.org/u/danfuterman)\
**Post date:** [June 11, 2018, 9:17am UTC](https://talk.openmrs.org/t/owa-generator-and-nodejs-4-x/18430/1 "2018-06-11T09:17:07Z")

</div>

I recently ran into an issue building an OWA that was scaffolded using the [OWA generator](https://github.com/openmrs/generator-openmrs-owa) in an old dev environment running NodeJS 4.x. [This](https://github.com/openmrs/generator-openmrs-owa/blob/master/app/templates/webpack.config.js#L35) line in `webpack.config.js` seemed to be the source of the issue, and resulted in the following stacktrace: [https://hastebin.com/arudetufij.rb](https://hastebin.com/arudetufij.rb)

Upgrading to NodeJS 6.x fixed the issue, but a few questions:

- Is NodeJS 4.x still widely used, and if so, has anyone run into similar issues?
- If the issue is confirmed, is the preferred approach to update the code (and ensure any new code doesn’t cause similar issues), or end support for NodeJS 4.x (noting that 4.x is now [‘end of life’](https://medium.com/the-node-js-collection/april-2018-release-updates-from-the-node-js-project-71687e1f7742) as of April 2018)? If NodeJS 4.x is no longer supported/recommended, this should be updated in the owa generator [README template](https://github.com/openmrs/generator-openmrs-owa/blob/master/app/templates/README.md), [OWA workflow wiki page](https://wiki.openmrs.org/display/docs/Open+Web+App+Development+Workflow#OpenWebAppDevelopmentWorkflow-2.InstalltheOpenWebAppsmodule), and possibly other files/pages.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [June 11, 2018, 9:28am UTC](https://talk.openmrs.org/t/owa-generator-and-nodejs-4-x/18430/2 "2018-06-11T09:28:32Z")

</div>

I did run into the exact problem, last week. Upgrading node is also what i did.

---

<div class="post-metadata">

**Author:** ![mogoodrich](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mogoodrich/32/3324_2.png) [@mogoodrich](https://talk.openmrs.org/u/mogoodrich)\
**Post date:** [June 11, 2018, 1:22pm UTC](https://talk.openmrs.org/t/owa-generator-and-nodejs-4-x/18430/3 "2018-06-11T13:22:53Z")

</div>

+1 to just changing the instructions to say Node JS 6+… 🙂

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/6_449c533f586939b6e5f246632a46421f.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [June 11, 2018, 4:11pm UTC](https://talk.openmrs.org/t/owa-generator-and-nodejs-4-x/18430/4 "2018-06-11T16:11:49Z")

</div>

Yeah, the README should definitely be updated. I’ll take care of it.

---

<div class="post-metadata">

**Author:** ![danfuterman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/danfuterman/32/10800_2.png) [@danfuterman](https://talk.openmrs.org/u/danfuterman)\
**Post date:** [June 11, 2018, 4:19pm UTC](https://talk.openmrs.org/t/owa-generator-and-nodejs-4-x/18430/5 "2018-06-11T16:19:18Z")

</div>

Cheers, thanks @pascal. I’ve updated the OWA workflow [wiki page](https://wiki.openmrs.org/display/docs/Open+Web+App+Development+Workflow#OpenWebAppDevelopmentWorkflow-2.InstalltheOpenWebAppsmodule) to indicate use of NodeJS 6+.
