Setup OPenMRS sdk

I need some help in setting up the sdk. It creates the server but the only challenge is its missing the O3 Distribution.

i would like to help me if i’m setting it wrongly, i stand to be corrected. bellow is what it displays:

You can setup the following distributions:
1) Reference Application 2.x
2) Reference Application 3.x
3) Platform
4) Other...

These are thte options displayed.

2) Reference Application 3.x

I will use that option and see what next.

Thank you very much sir for the response

I will try it and see what happens next

You can also go through this amazing setup video: link

Point noted boss. I will go through it.

Is this video part of the playlist for setup of the whole workspace system of the OpenMRS, (I would like to setup for frontend)?

I have been able to pass this first step but failed to successfully setup the server. Below is the error thrown:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  46:51 min
[INFO] Finished at: 2025-02-15T20:05:31+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:6.1.0:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to find/resolve artifact. The following artifacts could not be resolved: org.openmrs.module:reporting-omod:jar:1.27.0 (absent): Could not transfer artifact org.openmrs.module:reporting-omod:jar:1.27.0 from/to openmrs-repo (https://mavenrepo.openmrs.org/public): Connection reset -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

What could be the problem and to solve it?

new error occurred after i rerun the command mvn openmrs-sdk:setup

[INFO] [openmrs] Reading configuration C:\Users\jessek10\openmrs\server\spa-build-config.json ...
[INFO] [openmrs] Assembling dependencies and building import map and routes registry...
[INFO] [openmrs] request to https://registry.npmjs.org/@openmrs%2fesm-patient-lists-app failed, reason: Socket timeout
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:15 h
[INFO] Finished at: 2025-02-15T21:27:47+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:6.1.0:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to install spa with node: Unable to execute mojo: Failed to run task: 'npm --legacy-peer-deps --cache=C:\PROGRA~1\KMSpico\temp\openmrs-sdk-node1000550646589445450\npm-cache exec -- openmrs@6.0.5-pre.2698 assemble --target C:\Users\jessek10\openmrs\server\frontend --mode config --config C:\Users\jessek10\openmrs\server\spa-build-config.json' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException```

The playlist provides a general overview of the entire frontend (O3), not just the setup process.

1 Like

When it reaches this point, it fails with Socket timeout:

[INFO] Running 'npm --legacy-peer-deps --cache=C:\PROGRA~1\KMSpico\temp\openmrs-sdk-node6234823679828534075\npm-cache exec -- openmrs@6.0.5-pre.2698 assemble --target C:\Users\jessek10\openmrs\server\frontend --mode config --config C:\Users\jessek10\openmrs\server\spa-build-config.json' in C:\Users\jessek10
[INFO] [openmrs] Reading configuration C:\Users\jessek10\openmrs\server\spa-build-config.json ...
[INFO] [openmrs] Assembling dependencies and building import map and routes registry...
[INFO] [openmrs] Socket timeout
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  23:32 min
[INFO] Finished at: 2025-02-16T11:55:47+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:6.1.0:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to install spa with node: Unable to execute mojo: Failed to run task: 'npm --legacy-peer-deps --cache=C:\PROGRA~1\KMSpico\temp\openmrs-sdk-node6234823679828534075\npm-cache exec -- openmrs@6.0.5-pre.2698 assemble --target C:\Users\jessek10\openmrs\server\frontend --mode config --config C:\Users\jessek10\openmrs\server\spa-build-config.json' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

in the 3.x options there are 4 options:

1) 3.3.0-SNAPSHOT
2) 3.2.1
3) 3.1.1
4) 3.0.0

i have been selecting the first option and the build is still failing

I have been able to manouver through the setup process using the setup command. This has taken me three or four times of running the same command to have this successful. Than you for the assistance @dkayiwa and @harshthkkr .

my challenge now is when i ran the command mvn openmrs-sdk:run, the command failed as it showed that i have limited space on my disk. this was when seting up the MySQL database tables.

I request if there is anything i can do to solve this challenge, i will be grateful.

Try deleting any unnecessary files from your machine and then rerun the command to check if it works.

Ok. Let me try that and see if it will work

Try this to clear any old maven dependencies for space purposes. mvn dependency:purge-local-repository