Can't build orderentry owa

Tags: #<Tag:0x00007f600518e090> #<Tag:0x00007f600518dfc8>

Hi all,

I’m trying to build order-entry owa module but I’m getting the following error. A link to pastebin is here. I have executed npm run build:prod to create distributable file on the owa module’s root directory but it throws above errors. Can anyone please guide me, how to build this module? Unable to figure out the errors.

@dkayiwa @mogoodrich

whats your version of npm and node??

  • npm -v
  • node -v

Here are the versions below:

npm -v > 6.4.1

node -v > v10.15.0

Hi @mozzy,

I forgot to execute npm install therefore logs have now changed. Here is a paste bin link to logs. Can you please check again and guide me what exactly is the problem?

I was able to remove these linebreak errors by including "linebreak-style": 0 under rules in .eslintrc file like this

"rules": {
    .....
    "linebreak-style": 0,
.......
}

Then I executed npm run build:prod again, this time it started running tests but one Test Suite and one Test failed, therefore it failed to build the distributable file.

Is there anyway to ignore these tests for now? I just need a distributable file (.zip) file to install in openmrs to see the working of this owa module.

Any help would be highly appreciated!!

Did you get a chance to look at this? https://addons.openmrs.org/show/org.openmrs.owa.orderentryui

1 Like

Thanks @dkayiwa. Will look in to this.

then you didn’t need to build one. just follow the link @dkayiwa has given you and just download an existing built zip file

OK. but even when you’re to build the zip file your self , you didn’t need that local change

Right, could you please tell me how to fix this error otherwise? I would download the existing zip file as @dkayiwa suggested but it would be good if I am able to build the zip file myself too. As for now, 1 test suite and 1 test is failing. Please see below:

Any help would be highly appreciated, thanks!

it seems like you missed a step or incorrectly perfomed a step in these instructions

```
# Get the project
git clone https://github.com/openmrs/openmrs-owa-orderentry.git

# Move into the project directory
cd into openmrs-owa-orderentry

# Install the dependencies
npm install

# Create config.json

Create a config.json file in the top level directory following this template:

{
    'LOCAL_OWA_FOLDER': '/Users/name/openmrs-standalone-2.4/appdata/owa/',
    'APP_ENTRY_POINT': 'http://localhost:8081/openmrs-standalone/owa/orderentry/index.html'
}

"LOCAL_OWA_FOLDER" should point to the "owa" directory of your locally running OpenMRS instance, and
"APP_ENTRY_POINT" should point to the entry point of your app

## Linux/SDK example

For example in a link environment where I have OpenMRS running on port 8080 via the SDK in
directory "/home/mgoodrich/openmrs/haiti", I set config.json as follows:

{"LOCAL_OWA_FOLDER":"/home/mgoodrich/openmrs/haiti/owa",
"APP_ENTRY_POINT":"http://localhost:8080/openmrs/owa/openmrs-owa-orderentry/index.html"}

## Windows/Standalone example

Locate the 'appdata/owa' directory and type the following command to get the path to the 'appdata/owa' directory and copy it to the clipboard.
pwd | pbcopy

An example of the path is: /Users/name/downloads/openmrs-owa-orderentry/appdata\owa

Modify the path to look like: /Users/name/downloads/openmrs-owa-orderentry/appdata\\owa/

Copy the path. Edit config.json as follows:
{
  "LOCAL_OWA_FOLDER": "PASTE_THE_PATH_YOU_COPIED_HERE",
  "APP_ENTRY_POINT": "http://localhost:8081/openmrs-standalone/owa/openmrs-owa-orderentry/index.html"
}

Note: Start your cohort builder standalone server locally. Make sure you tomcat port is 8081, if not, change the APP_ENTRY_POINT localhost port to be the same as your tomcat port.

# Run the app
npm run watch
```
1 Like

I have gone through these steps from github page but will give it another try. Thanks!

I did some changes in order entry owa added one component in it but cant able to build the app please help here is my log file.

Which versions of node and npm do you have?

FYI - if all you want to do is build the OWA, then the blueprint for this can be found under the .github/workflows where the specification exists for how this is built in our CI pipeline:

Specifically, this uses Node 14.x and runs:

  • npm ci
  • npm run build --if-present
  • npm test