# React-scripts has unexpectedly closed (exit code 1)

**URL:** <https://forum.ionicframework.com/t/react-scripts-has-unexpectedly-closed-exit-code-1/191558>\
**Category:** Ionic React\
**Created:** [June 21, 2020, 8:10am UTC](https://forum.ionicframework.com/t/react-scripts-has-unexpectedly-closed-exit-code-1/191558 "2020-06-21T08:10:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dony19](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Dony19](https://forum.ionicframework.com/u/Dony19)\
**Post date:** [June 21, 2020, 8:10am UTC](https://forum.ionicframework.com/t/react-scripts-has-unexpectedly-closed-exit-code-1/191558/1 "2020-06-21T08:10:44Z")

</div>

when i run ionic serve, i get this :

> react-scripts start  
> [react-scripts] ℹ ｢wds｣: Project is running at [http://192.168.43.160/](http://192.168.43.160/)  
> [react-scripts] ℹ ｢wds｣: webpack output is served from  
> [react-scripts] ℹ ｢wds｣: Content not from webpack is served from /home/epsilon/lab/mobile/myApp/public  
> [react-scripts] ℹ ｢wds｣: 404s will fallback to /  
> [react-scripts] Starting the development server…  
> [react-scripts]  
> [react-scripts] events.js:292  
> [react-scripts] throw er; // Unhandled ‘error’ event  
> [react-scripts] ^  
> [react-scripts] Error: ENOSPC: System limit for number of file watchers reached, watch ‘/home/epsilon/lab/mobile/myApp/public/assets/icon’  
> [react-scripts] at FSWatcher.start (internal/fs/watchers.js:169:26)  
> [react-scripts] at Object.watch (fs.js:1415:11)  
> [react-scripts] at createFsWatchInstance (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/lib/nodefs-handler.js:38:15)  
> [react-scripts] at setFsWatchListener (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/lib/nodefs-handler.js:81:15)  
> [react-scripts] at FSWatcher.NodeFsHandler.\_watchWithNodeFs (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/lib/nodefs-handler.js:233:14)  
> [react-scripts] at FSWatcher.NodeFsHandler.\_handleDir (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/lib/nodefs-handler.js:429:19)  
> [react-scripts] at FSWatcher. (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/lib/nodefs-handler.js:477:19)  
> [react-scripts] at FSWatcher. (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/lib/nodefs-handler.js:482:16)  
> [react-scripts] at FSReqCallback.oncomplete (fs.js:168:5)  
> [react-scripts] Emitted ‘error’ event on FSWatcher instance at:  
> [react-scripts] at FSWatcher.\_handleError (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/index.js:260:10)  
> [react-scripts] at createFsWatchInstance (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/lib/nodefs-handler.js:40:5)  
> [react-scripts] at setFsWatchListener (/home/epsilon/lab/mobile/myApp/node\_modules/webpack-dev-server/node\_modules/chokidar/lib/nodefs-handler.js:81:15)  
> [react-scripts] [… lines matching original stack trace …]  
> [react-scripts] at FSReqCallback.oncomplete (fs.js:168:5) {  
> [react-scripts] errno: -28,  
> [react-scripts] syscall: ‘watch’,  
> [react-scripts] code: ‘ENOSPC’,  
> [react-scripts] path: ‘/home/epsilon/lab/mobile/myApp/public/assets/icon’,  
> [react-scripts] filename: ‘/home/epsilon/lab/mobile/myApp/public/assets/icon’  
> [react-scripts] }

[ERROR] react-scripts has unexpectedly closed (exit code 1).

```
    The Ionic CLI will exit. Please check any output above for error details.

```

i’m beginner in ionic, some one can help me ?

---

<div class="post-metadata">

**Author:** ![mirkonasato](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mirkonasato/32/131398_2.png) [@mirkonasato](https://forum.ionicframework.com/u/mirkonasato)\
**Post date:** [June 21, 2020, 9:43am UTC](https://forum.ionicframework.com/t/react-scripts-has-unexpectedly-closed-exit-code-1/191558/2 "2020-06-21T09:43:55Z")

</div>

> [@Dony19](#):
>
> Error: ENOSPC: System limit for number of file watchers reached

Are you on Linux? You probably need to [increase the amount of inotify watchers](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers).

(This is not specific to Ionic by the way, it’s [the same](https://github.com/facebook/create-react-app/issues/7612) for e.g. Create React App projects.)

---

<div class="post-metadata">

**Author:** ![Dony19](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Dony19](https://forum.ionicframework.com/u/Dony19)\
**Post date:** [June 24, 2020, 7:01am UTC](https://forum.ionicframework.com/t/react-scripts-has-unexpectedly-closed-exit-code-1/191558/3 "2020-06-24T07:01:14Z")

</div>

i’m working in linux (ubuntu 18.04).

thanks, it works now

---

<div class="post-metadata">

**Author:** ![dktatgx](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@dktatgx](https://forum.ionicframework.com/u/dktatgx)\
**Post date:** [October 6, 2020, 12:47pm UTC](https://forum.ionicframework.com/t/react-scripts-has-unexpectedly-closed-exit-code-1/191558/4 "2020-10-06T12:47:54Z")

</div>

I had the same problem as @Dony19 and after following the link you shared I was able to fix it. Thanks @mirkonasato
