# Failing setup dev setup using yarn

**URL:** https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954
**Category:** Development
**Tags:** o3
**Created:** [November 21, 2023, 2:10pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954 "2023-11-21T14:10:51Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [November 21, 2023, 2:10pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/1 "2023-11-21T14:10:51Z")

</div>

Hello forks, I am trying to set up dev setup for O3 on my machine using

> yarn setup

But my machine freezes and fails to complete setup. Has this happened to anyone before and it seems I can not proceed from there.@dkayiwa

---

<div class="post-metadata">

### Author: ![jwnasambu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jwnasambu/32/13543_2.png) [@jwnasambu](https://talk.openmrs.org/u/jwnasambu)
#### Post date: [November 21, 2023, 5:33pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/2 "2023-11-21T17:33:22Z")

</div>

Oh sorry @suubi7 Kindly do you mind sharing the error you are getting after running the command?

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [November 23, 2023, 12:45pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/3 "2023-11-23T12:45:39Z")

</div>

It does not actually give an error log, it just hangs and does not complete. @jwnasambu

> @openmrs/esm-devtools-app:build: @openmrs/esm-devtools-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). @openmrs/esm-devtools-app:build: This can impact web performance. @openmrs/esm-devtools-app:build: Assets: @openmrs/esm-devtools-app:build: 889.js (402 KiB) @openmrs/esm-devtools-app:build: @openmrs/esm-devtools-app:build: webpack 5.88.0 compiled with 1 warning in 152624 ms

it stops here

---

<div class="post-metadata">

### Author: ![jwnasambu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jwnasambu/32/13543_2.png) [@jwnasambu](https://talk.openmrs.org/u/jwnasambu)
#### Post date: [November 23, 2023, 4:23pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/4 "2023-11-23T16:23:39Z")

</div>

Oh sorry! I can relate coz I have ever been there.

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [November 24, 2023, 2:39pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/5 "2023-11-24T14:39:08Z")

</div>

What did you do to go around it @jwnasambu

---

<div class="post-metadata">

### Author: ![jwnasambu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jwnasambu/32/13543_2.png) [@jwnasambu](https://talk.openmrs.org/u/jwnasambu)
#### Post date: [November 25, 2023, 7:48pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/6 "2023-11-25T19:48:06Z")

</div>

> [@suubi7](#):
>
> > @openmrs/esm-devtools-app:build: @openmrs/esm-devtools-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). @openmrs/esm-devtools-app:build: This can impact web performance. @openmrs/esm-devtools-app:build: Assets: @openmrs/esm-devtools-app:build: 889.js (402 KiB) @openmrs/esm-devtools-app:build: @openmrs/esm-devtools-app:build: webpack 5.88.0 compiled with 1 warning in 152624 ms

You are right! this warning is just informing us that the size of the `889.js` asset in your application exceeds the recommended limit, which could affect the performance of your web application. You may want to consider optimizing the size of this asset or investigating ways to improve the overall performance of your application during the build process. @dennis, @ibacher , @vasharma05 kindly is it advisable to use `TerserPlugin` to minify and compress the code to help unblock @suubi7?

---

<div class="post-metadata">

### Author: ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)
#### Post date: [November 29, 2023, 6:08pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/7 "2023-11-29T18:08:42Z")

</div>

cc: @dennis This seems related to the issue you were experiencing…

> [@jwnasambu](#):
>
> kindly is it advisable to use `TerserPlugin` to minify and compress the code to help unblock @suubi7?

We already use Terser; it’s built into Webpack 5.

@suubi7 Running `yarn setup` isn’t actually critical, as long as it gets past the `yarn install` step. It would probably be useful to also run `yarn turbo build --filter=@openmrs/esm-framework`, but you should actually be good to go.

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [December 4, 2023, 1:46pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/8 "2023-12-04T13:46:24Z")

</div>

@ibacher @jwnasambu I am running into this error when I try to run O3 locally using

> yarn run: omrs

Error is `Error: ENOENT: no such file or directory, stat '/home/suubi7/OpenMRS-Tickets/O3-1409/openmrs-esm-core/packages/shell/esm-app-shell/dist/index.html'`

Could this be because of failing `yarn setup` or `yarn build`

I am trying to view my changes.

---

<div class="post-metadata">

### Author: ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)
#### Post date: [December 4, 2023, 1:48pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/9 "2023-12-04T13:48:42Z")

</div>

Hmmm… Yes, it does appear you need to build the app shell.

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [December 4, 2023, 2:13pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/10 "2023-12-04T14:13:07Z")

</div>

@ibacher this happens when building the project through `yarn build` or can `yarn run:shell` work as well?

---

<div class="post-metadata">

### Author: ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)
#### Post date: [December 4, 2023, 2:20pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/11 "2023-12-04T14:20:24Z")

</div>

> [@suubi7](#):
>
> this happens when building the project through `yarn build` or can `yarn run:shell` work as well?

Not without the build step. Unfortunately, with the information you’ve supplied in this thread, I really have no idea why anything is failing…

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [December 4, 2023, 2:27pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/12 "2023-12-04T14:27:59Z")

</div>

> [@Failing setup dev setup using yarn](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/3):
>
> It does not actually give an error log, it just hangs and does not complete. @jwnasambu @openmrs/esm-devtools-app:build: @openmrs/esm-devtools-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). @openmrs/esm-devtools-app:build: This can impact web performance. @openmrs/esm-devtools-app:build: Assets: @openmrs/esm-devtools-app:build: 889.js (402 KiB) @openmrs/esm-devtools-app:build: @openmrs/esm-devtools-app:build: webpack 5.88.0 compile…

@ibacher When I run `yarn build` this earlier problem comes again. The process does not complete. Not sure why as well

---

<div class="post-metadata">

### Author: ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)
#### Post date: [December 4, 2023, 2:28pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/13 "2023-12-04T14:28:28Z")

</div>

Are you able to provide the full output?

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [December 4, 2023, 2:54pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/14 "2023-12-04T14:54:38Z")

</div>

Sure @ibacher before the terminal crushes this is the log `https://pastebin.com/NJVs06ps`

---

<div class="post-metadata">

### Author: ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)
#### Post date: [December 4, 2023, 3:29pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/15 "2023-12-04T15:29:59Z")

</div>

Ok… So I’m seeing a few things here:

1. There are some cached files (`@openmrs/webpack-config:build: cache hit, replaying output 54b0845024a06984`)
2. Build performance seems to be drastically decreasing as the build goes on (the framework build takes 51989ms whereas the devtools, which is lighter-weight takes 152624ms) (this may help me with another issue: what’s the output of `git rev-parse HEAD`?)

Could you please try running `yarn turbo build --concurrency 1` and see if that helps? You may need to run it several times (the idea here is to build up the Turbo cache).

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [December 5, 2023, 10:01am UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/16 "2023-12-05T10:01:14Z")

</div>

The output for `git rev-parse HEAD` gives

`46623830e7f07516f700cfcd6dea8d3c1f288147`

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [December 5, 2023, 10:30am UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/17 "2023-12-05T10:30:55Z")

</div>

> [@ibacher](#):
>
> yarn turbo build --concurrency 1

@ibacher The turbo build is successful but when i run `yarn run:omrs` the `SPA` gives a blank page nothing is shown.

---

<div class="post-metadata">

### Author: ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)
#### Post date: [December 5, 2023, 12:50pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/18 "2023-12-05T12:50:57Z")

</div>

What’s the full command you’re running?

---

<div class="post-metadata">

### Author: ![suubi7](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suubi7/32/18525_2.png) [@suubi7](https://talk.openmrs.org/u/suubi7)
#### Post date: [December 5, 2023, 12:53pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/19 "2023-12-05T12:53:07Z")

</div>

> [@suubi7](#):
>
> yarn run:omrs

This is the command I am running to run SPA

---

<div class="post-metadata">

### Author: ![thembo42](https://talk.openmrs.org/user_avatar/talk.openmrs.org/thembo42/32/21346_2.png) [@thembo42](https://talk.openmrs.org/u/thembo42)
#### Post date: [December 5, 2023, 1:09pm UTC](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954/20 "2023-12-05T13:09:57Z")

</div>

> [@suubi7](#):
>
> Error is `Error: ENOENT: no such file or directory, stat '/home/suubi7/OpenMRS-Tickets/O3-1409/openmrs-esm-core/packages/shell/esm-app-shell/dist/index.html'`
> 
> Could this be because of failing `yarn setup` or `yarn build`

```auto
yarn build or yarn setup 

```

need to pass to ensure all necessary configs, files and dependencies are setup well. I guess after they pass `yarn run:shell ` should spin up yo dev environment.

[Next page](https://talk.openmrs.org/t/failing-setup-dev-setup-using-yarn/40954.md?page=2)
