Eclipse error while compiling AppointmentSchedulingUI

I get this error when I import the cloned AppointmentSchedulingUI and compile it. Are there plugins I need to install to resolve this error? @dkayiwa Could this be related to this issue failure during building appointment scheduling UI module even after installing npm and bower - #6 by dkayiwa Thanks

Just ignore them and click Finish.

well…building still fails…

Building from eclipse or command line would still require first resolving the other issue.

What error message do you get when it fails?

http://pastebin.com/uJkSGchf

@wyclif

Do you have bower installed at C:\Users\HossamEldeen\AppData\Roaming\npm\bower?

yes I do

Are you sure you downloaded the correct bower binaries for you platform? Make sure you downloaded that of for windows, do you have a 32 or 64 bit machine?(Not sure if this matters). Sorry I don’t really use windows so I might be of less help, someone like @raff that uses windows might be able to know what’s going on.

1 Like

I have a 64 bit machine. and I installed bower using the command: npm install -g bower

didn’t really choose.

@raff any idea how to solve this? Looks like I’m not the only one:

All this Bower, NPM, Node stuff is nonsense, we should go with Vanilla JS :worried:

Bower and NPM are for package management, so this is like saying “maven is nonsense we should go with vanilla Java”. :slight_smile:

1 Like

Good point :slight_smile:

I personally don’t think the value maven brings to Java projects should be compared to what bower/npm bring to JS, it is minimal when it comes to bower/npm in the context of a small project like an openmrs module

Even for a big project, if the JS libraries used are few and static (and there is no JS dependency hell) there’s no need for a package manager at all.

Am a newbie when it comes to bower/npm. What would happen if we removed them from this module?

Bower and npm are used to fetch dependencies. I don’t know exactly how they’re used in this module, but the build passes in CI, and fails for Ali with what seems like a windows-specific issue…

Command execution failed. Cannot run program “C:\Users\HossamEldeen\AppData\Roaming\npm\bower” (in directory “E:\openmrs\openmrs-module-appointmentschedulingui\omod\src\main\webapp\resources\scripts”): CreateProcess error=193, %1 is not a valid Win32 application

I would suggest that Ali should google around to see how to address the Windows issue, or else run the build in a (linux) VM.

Quick googling shows me java - exec-maven-plugin says cannot run specified program, even though it is on the PATH - Stack Overflow

First, try using a newer version of exec-maven-plugin (1.4+). Otherwise, try what’s mentioned in the tl;dr

1 Like

If I understood it correctly, NPM is used normally to build server JS stuff whereas Bower is mostly used to build front-end JS stuff. So in theory we should require just Bower. But Bower itself requires Node.js and NPM to be installed, so that’s why 2 package managers are needed. It’s a bit surreal.

What is unique about this module to require what other modules do not? Am asking because i have seen many questions regarding failure to compile this particular module because of npm/bower issues. Am not discrediting their use, but asking that do we have simpler alternatives? :slight_smile: