Working on Issue MF434

Hi Ian, I did not run the command that you gave with port 1234. Otherwise, should I run this command NODE_OPTIONS="--max-old-space-size=8192" npx openmrs@latest debug --backend https://openmrs-spa.org/ --run-project before or after running this command npx openmrs debug --run-project --port 1234? I think both of them run processes, so I do not see them running together.

@zoe Yeah, they’re basically the same command. You don’t need to run both of them.

NODE_OPTIONS=--max-old-space-size=8192" just sets an environment variable (and actually isn’t necessary if you use a version of Node that’s 12 or greater iirc); the actual command run is npx openmrs debug --run-project (ignore the rest of the bits there). The difference between that and the other command is whether or not you have the --port 1234 flag (which you only need if for whatever reason, you already have something else running on port 8080). So just run one of those commands and leave it running.

Thank you for the explanation. Since I just run the NODE_OPTIONS command, I do not think I used port 1234 for that. I could not open the webpage http://localhost:8080/openmrs/spa/login afterwards, but this webpage did show up file:///home/zoe/openmrs-esm-primary-navigation/node_modules/@openmrs/esm-app-shell/dist/report.html. I am not sure what the purpose of the webpage is.

Since the webpage http://localhost:8080/openmrs/spa/login could not be loaded for me, I do not think I started a new dev server successfully. Do I need to start a server in order to make code changes? After looking more into the issue MF434, I think maybe I should have forked openmrs-esm-config instead of openmrs-esm-primary-navigation?

Technically, you can always write code, but if you can’t verify the code actually works or does what it’s intended to, it seems like that would be a less than useful exercise. (Sufficient unit tests could make up for this, of course).

What happens when you try to go to that page?

No. The thing we want to control is this component. openmrs-esm-config is the configuration framework, but you wouldn’t actually be changing the code there. You probably should take a look at this part of the config documentation and maybe the configuration schema for patient-chart to get a sense for how this is used.

The dev server helps you to verify the code changes you make in the repository you are making changes to

1 Like

This is the resulting webpage.

Also may I ask the purpose of this page? Thank you!

Hmmm… what happens when you try to navigate to https://openmrs-spa.org/openmrs/spa/login?

It shows the size of the various components being included in the final bundle for the project that you’re working on. It exists largely to make sure we’re tracking if we accidentally add large amounts of data to the JS files via imports, etc.

The openmrs.org page loads fine for me, and thank you for the explanation!

Not the openmrs.org page, the openmrs-spa.org/openmrs/spa/login page. It’s on a different server, so it could be something different happening.

Sorry; I don’t know why Discourse turned my link into a title.

Yes it also works for me. It directs me to the new UI where I need to type in my username

Sounds like you’re getting to the right place then. Maybe try this: go to: http://localhost:8080/openmrs/spa/login/ (note the slash at the end). Otherwise, you might have better luck on our #microfrontend channel on our Slack instance.

Right. I tried it again and the same 404 NotFound error came up. I will ask this question in the slack channel. Thank you so much for your time Ian!