Setting Up openmrs-esm-patient-management for Testing

Hello Everyone, I am trying to setup openmrs-esm-patient-management for understanding the E2E tests in the openMRS. But I am getting this error when trying to start the development server.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at basename (path.js:743:5)
    at getMainBundle (D:\open-source\O3\openmrs-esm-patient-management\node_modules\openmrs\dist\utils\dependencies.js:13:35)
    at runProjectWebpack (D:\open-source\O3\openmrs-esm-patient-management\node_modules\openmrs\dist\utils\importmap.js:93:53)
    at D:\open-source\O3\openmrs-esm-patient-management\node_modules\openmrs\dist\utils\importmap.js:135:17
    at Generator.next (<anonymous>)
    at fulfilled (D:\open-source\O3\openmrs-esm-patient-management\node_modules\openmrs\dist\utils\importmap.js:5:58) {
  code: 'ERR_INVALID_ARG_TYPE'
}

I am using windows machine and completed the o3 setup using docker. When I am doing the yarn start I am getting the above error.

If anyone can help me with the issue that would be a great help.

1 Like

@kdaud @jayasanka Please Help!!

Have you installed the project dependencies successfully?

Yes I did the yarn install and also setup the O3 using the docker desktop. containers inside the docker desktop was also running when I was trying to start the dev server.

Are you able to share the full error report via pastebin.com?

Here is the link error - Pastebin.com.

The logs you shared doesn’t show a full build report.

Build logs are exceeding the size of 512kb of the pastebin. But I tried running openmrs-esm-template-app it is running fine on my local. Just for the confirmation, you want me to share the docker logs, right?

Which command are you using to start the server?

docker-compose up for starting the O3 and yarn start for starting the openmrs-esm-patient-management

On which command does the error occur?

yarn start

when I am trying to start the dev server using yarn start for openmrs-esm-template-app it is working fine.

What happens when you run a particular package?

yarn start --sources 'packages/esm-patient-appointments-app'

getting this error

1 Like

I am using this docker.yml file for setting up O3.

This is the log for the yarn install

@anjisvj @piumal1999 do you have an idea on what Mishra is experiencing?

I’m also facing this issue. For some reason, it fails to get the importmap.js from https://dev3.openmrs.org/openmrs/spa/importmap.json

cc: @vasharma05

The app is called “esm-appointments-app” not “esm-patient-appointments-app”. @ayushmishra If you want to use a local backend, you also need to add --backend http://localhost/openmrs/ to your command.

1 Like