Not able to Yarn Link frontend modules

I have made changes to @openmrs/esm-implementer-tools-app to fix O3-1169

I am trying to run/test these changes locally following instructions in openmrs-esm-core/ → Linking the framework

Below is the error i get:

> cd packages/apps/esm-implementer-tools-app
> yarn link
Unknown Syntax Error: Not enough positional arguments.

Any idea how to fix this?

Oh yeah, those instructions need to be updated and even potentially reconsidered for Yarn v3. See the new documentation here. Basically, you just specify a file path instead of the old syntax. That said, it’s not clear what you’re trying to link in? Note that if you’re developing on the esm-core monorepo, the packages should already be linked (via being part of the same Yarn workspace), so updates to the framework should just work. Those instructions are for if you make changes to esm-core and want to test the with an application in a different repo.

Thanks for reply @ibacher

I am developing on esm-core. and testing out my changes by running yarn run:shell . But my changes are not getting reflected. is that correct use of yarn run:shell ?

So, if you’re making changes to the App Shell itself, you would use that command, but if you’re just testing the implementer tools, you should just run the implementer tools app. It looks like the command for that is currently yarn run:omrs develop --sources packages/apps/esm-implementer-tools-app.

I tried that command, and got the error: command not found: openmrs

Then i followed the tooling documentation:

cd packages/tooling/openmrs
yarn build

But that started some kind of server:

[HPM] Proxy created: /openmrs/**,!/openmrs/spa/**  ->
[openmrs] Listening at http://localhost:8080
[openmrs] SPA available at http://localhost:8080/openmrs/spa

That is not the correct way to develop the feature is it? :sweat_smile:

Whoops! That’s fortunately easy to fix. Thanks for finding this and sorry for the trouble. I’m going to throw together a PR to solve this permanently. In the mean time, if you can run (in the root of the project):

yarn add -D openmrs

that should make the run:openmrs command work…