Error building OWA Cohort builder app

Hello,

I cloned owa cohort builder app and I get an error when i try to build it. The error is as below:

npm ERR! Failed at the cohortbuilder@0.1.0 build script ‘npm run clean && webpack --progress --colors --mode=production --target=web’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the cohortbuilder package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run clean && webpack --progress --colors --mode=production --target=web npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs cohortbuilder npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls cohortbuilder npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/antony/workspace/openmrs-owa-cohortbuilder/npm-debug.log

npm ERR! Linux 4.4.0-81-generic npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “run” “build:prod” npm ERR! node v6.11.2 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! cohortbuilder@0.1.0 build:prod: npm run test && npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cohortbuilder@0.1.0 build:prod script ‘npm run test && npm run build’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the cohortbuilder package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run test && npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs cohortbuilder npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls cohortbuilder npm ERR! There is likely additional logging output above.

It fails when I execute npm run build:prod

I would appreciate any help on this.

Thanks, Antony

Hi @aojwang, Please did you go through the installation guide HERE

Yes @jeiddiah. Do you even have an already compiled code (the zip file) that i can just upload? I will keep trying packaging it though i also wanted to have a quick test.

Thanks

Hi @aojwang, You can view the link to the latest version of the cohort builder here: https://modules-refapp.openmrs.org/openmrs/owa/cohortbuilder/index.html#/

username: admin

password : sup3rS3cr3tPassw0rd

Can you attach this log File?

Better to confirm before, you have updated your Node.js and NPM before using cohort builder

Hey, Please find attached log file.

Thanks

Sry, I didn’t get it :frowning:

Find it here https://pastebin.com/j18hKuvY

@suthagar23 did you manage to find something in the error log? Please share with me a compiled code (the zipped) for owa cohort builder and try testing it. I would prefer the one with SQL tab even thought it could still be under development. Thanks in advance

@aojwang can you try these instructions to see if you can build it for yourself locally? https://github.com/openmrs/openmrs-owa-cohortbuilder

@dkayiwa I managed to build it eventually. I however get the attached error when uploading it using open web app module.

Please assist.

Thanks

I see permission denied. Can you check and change access permission to the file such that the openmrs process can access it?

Am not so sure which directory i need to change its permission. Is it the destination or source directory?

When not sure, it does not hurt to check both. :smile: Check the zip file permissions.

@dkayiwa I had to set permission on owa directory to 777 for the builder to be deployed. I seem to be so much in need of the module thus my many questions. I however experienced the following after setup:

  1. No results when building cohorts. I also see a lot of errors in the console and they are as shown in the images attached.

    , , Is there anything I need to do?

  2. Can I access a branch with the sql tab?

So far am so happy that the builder is finally out. Looking forward to your response.

@millicent @kingisaac95 @jeiddiah @upendo i remember we talked about these JavaScript errors. Did you get to fix them?

Please do the following stop the app run: npm install (if you haven’t to install the dependencies) run: bower install (to install libraries used eg. toastr) Restart the app Tell me what you have

Hi @aojwang, Sorry about that, a pull request has been raised to fix this issue, however to fix this issue on your end, running bower install toastr on the terminal would fix it.

@jeiddiah I have tried both suggestions and am still having js issues as shown

Other than rest web services and owa modules, is there other modules that owa cohort builder requires?

@aojwang, the toastr error has been fixed thankfully. Do you have a reportingrest module v1.8.0 and above.