# The problem about the webpack watcher when setting up development version installation

**URL:** <https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873>\
**Category:** General Discussion\
**Created:** [July 25, 2020, 2:51pm UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873 "2020-07-25T14:51:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![malanxin](https://talk.getindico.io/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@malanxin](https://talk.getindico.io/u/malanxin)\
**Post date:** [July 25, 2020, 2:51pm UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/1 "2020-07-25T14:51:47Z")

</div>

Hello,  
I am setting up the develpment version indico instance following the guide [https://docs.getindico.io/en/stable/installation/development/](https://docs.getindico.io/en/stable/installation/development/)

When I run webpack watcher, I have got the error.

```auto
cd ~/dev/indico
virtualenv env -p /usr/bin/python2.7
source ./env/bin/activate
cd src
 ./bin/maintenance/build-assets.py indico --dev --watch
Traceback (most recent call last):
  File "./bin/maintenance/build-assets.py", line 273, in <module>
    cli()
  File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "./bin/maintenance/build-assets.py", line 181, in build_indico
    subprocess.check_call(['npx', 'webpack'] + args)
  File "/usr/lib64/python2.7/subprocess.py", line 537, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

```

What caused the problem ? WHat should I check ?

Thanks a lot,

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [July 25, 2020, 2:57pm UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/2 "2020-07-25T14:57:12Z")

</div>

“Permission denied” when running webpack seems strange. Try running `npx webpack --help` manually and see if this works.

---

<div class="post-metadata">

**Author:** ![malanxin](https://talk.getindico.io/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@malanxin](https://talk.getindico.io/u/malanxin)\
**Post date:** [July 26, 2020, 7:52am UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/3 "2020-07-26T07:52:12Z")

</div>

you are right. npx is missing. I re-installed nodejs.  
npx -v  
6.14.6

“npx webpack --help” works now.

I re-ran “npm install”

```auto
(env) [mlx@cindico src]$ npm install
npm WARN leaflet.markercluster@1.4.1 requires a peer of leaflet@~1.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fullcalendar/node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fullcalendar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 2529 packages in 13.789s

104 packages are looking for funding
  run `npm fund` for details

found 7 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

```

```auto
./bin/maintenance/build-assets.py indico --dev --watch
 Error from chokidar (/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/CombDiacritMarks.js'
Error from chokidar (/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/Main.js'
Error from chokidar (/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/Other.js'
Error from chokidar (/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Italic): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Italic/BasicLatin.js'

```

I have got a lot of errors. I do not understand them.  
What should I check ?

Thank you very much!!

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [July 26, 2020, 9:32am UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/4 "2020-07-26T09:32:47Z")

</div>

Googline for “System limit for number of file watchers reached” most likely helps. Anyway, you can just omit the `--watch` to disable the file watcher. Since you won’t edit JS/CSS files having the watcher running isn’t important anyway.

---

<div class="post-metadata">

**Author:** ![malanxin](https://talk.getindico.io/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@malanxin](https://talk.getindico.io/u/malanxin)\
**Post date:** [July 28, 2020, 7:04am UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/5 "2020-07-28T07:04:41Z")

</div>

I have fixed th error “System limit for number of file watchers reached”. I hav encountered other problems now.  
Here is what I did:

```auto
cd ~/dev1/indico/
virtualenv env -p /usr/bin/python2.7
source ./env/bin/activate
cd src
./bin/maintenance/build-assets.py indico --dev --watch &

indico run -h cindico.ihep.ac.cn -q --enable-evalex &

sudo setsebool -P httpd_can_network_connect 1
sudo setsebool -P httpd_read_user_content 1
sudo chown -R mlx:nginx /var/lib/nginx/tmp/
indico run -h 127.0.0.1 -p 8000 -q --enable-evalex --url https://cindico.ihep.ac.cn --proxy &
sudo systemctl start nginx

```

When I run them above, everything looks ok. I did not get erros.

But , it does not work when I link to [https://cindico.ihep.ac.cn](https://cindico.ihep.ac.cn) in browser.  
" 504 Gateway Time-out" is shown at webpage.

There is no any message in log files

```auto
$ ls -l
total 0
-rw-rw-r--. 1 mlx mlx 0 Jul 26 14:42 celery.log
-rw-rw-r--. 1 mlx mlx 0 Jul 26 14:42 indico.log
-rw-rw-r--. 1 mlx mlx 0 Jul 26 14:42 other.log

```

I saw the following line in nginx log  
more cindico.ssl\_error\_log

```auto
2020/07/28 15:02:03 [error] 13423#0: *9 upstream timed out (110: Connection timed out) while reading response header from upstream, client: ::ffff:202.122.32.62, server: cindico.ihep.ac.cn, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:8000/", host: "cindico.ihep.ac.cn"

```

```auto
$ cat indico/indico.conf
# General settings
SQLALCHEMY_DATABASE_URI = 'postgresql:///indico'
SECRET_KEY = ......
#BASE_URL = 'http://127.0.0.1:8000'
BASE_URL = 'https://cindico.ihep.ac.cn'
CELERY_BROKER = 'redis://127.0.0.1:6379/0'
REDIS_CACHE_URL = 'redis://127.0.0.1:6379/1'
CACHE_BACKEND = 'redis'
DEFAULT_TIMEZONE = 'Asia/Shanghai'
DEFAULT_LOCALE = 'en_GB'
ENABLE_ROOMBOOKING = True
CACHE_DIR = '/home/mlx/dev1/indico/data/cache'
TEMP_DIR = '/home/mlx/dev1/indico/data/tmp'
LOG_DIR = '/home/mlx/dev1/indico/data/log'
STORAGE_BACKENDS = {'default': 'fs:/home/mlx/dev1/indico/data/archive'}
ATTACHMENT_STORAGE = 'default'

# Development options
DB_LOG = True
DEBUG = True
SMTP_USE_CELERY = False

```

WHat should I check ?

Thanks a lot,

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [July 28, 2020, 7:20am UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/6 "2020-07-28T07:20:14Z")

</div>

Does accessing `http://127.0.0.1:8000` directly on the server work? And try not sending the process into the background with `&` so you actually see if it shows any error, receives requests, etc.

PS: Just to be sure: This is an internal test setup, right? Because if `cindico.ihep.ac.cn` was a public host, this deployment - especially with `--enable-evalex` - would be highly insecure.

---

<div class="post-metadata">

**Author:** ![malanxin](https://talk.getindico.io/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@malanxin](https://talk.getindico.io/u/malanxin)\
**Post date:** [July 28, 2020, 7:59am UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/7 "2020-07-28T07:59:30Z")

</div>

Ｉrun “indico proxy” in frontend  
indico run -h 127.0.0.1 -p 8000 -q --enable-evalex --url [https://cindico.ihep.ac.cn](https://cindico.ihep.ac.cn) --proxy

and try

lynx [http://127.0.0.1:8000](http://127.0.0.1:8000)

it shows “HTTP request sent; waiting for response.”

No errors show at proxy  
indico run -h 127.0.0.1 -p 8000 -q --enable-evalex --url [https://cindico.ihep.ac.cn](https://cindico.ihep.ac.cn) --proxy

- Serving Indico on [https://cindico.ihep.ac.cn](https://cindico.ihep.ac.cn)
- Werkzeug debugger console on [https://cindico.ihep.ac.cn/console](https://cindico.ihep.ac.cn/console)
- Werkzeug debugger console is available to all clients!
- Running on [http://127.0.0.1:8000/](http://127.0.0.1:8000/) (Press CTRL+C to quit)
- Restarting with inotify reloader
- Debugger is active!
- Debugger PIN: 337-377-688

Does “Indico proxy” not work ?

---

<div class="post-metadata">

**Author:** ![malanxin](https://talk.getindico.io/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@malanxin](https://talk.getindico.io/u/malanxin)\
**Post date:** [July 28, 2020, 8:00am UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/8 "2020-07-28T08:00:23Z")

</div>

This is an internal test setup, it cannot be access forn outside.

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [July 28, 2020, 8:03am UTC](https://talk.getindico.io/t/the-problem-about-the-webpack-watcher-when-setting-up-development-version-installation/1873/9 "2020-07-28T08:03:19Z")

</div>

The setup with nginx as described in the dev setup guide works fine for us. I’m afraid we cannot really help you debug this problem but my guess would be some weird issue with selinux or your local firewall if not even accessing the dev server via 127.0.0.1:8000 works…
