Bench Start Error: There was an error during rebuilding changes

Hi, I am new to FrappeFramework and was following the official guide to do manual installation. I was going through Library Management guide. I was able to proceed until the part where I added site to host.

At this point, when I start bench, this error occurs. From some other screenshots that I’ve seen, it should be able to start rebuilding js/css files. But i got error before those processes.

There was an error during rebuilding changes.

caused by:

/home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1660
12:06:57 watch.1       |   for (const message of messages) {
12:06:57 watch.1       |                         ^
12:06:57 watch.1       | 
12:06:57 watch.1       | TypeError: messages is not iterable

I’ve been searching around but it seems like no doc that is mentioning the same issue.

Full message:

~/frappe-bench$ bench start
12:06:15 system        | web.1 started (pid=337714)
12:06:15 system        | redis_queue.1 started (pid=337712)
12:06:15 redis_queue.1 | 337718:C 07 Dec 2023 12:06:15.508 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12:06:15 redis_queue.1 | 337718:C 07 Dec 2023 12:06:15.508 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=337718, just started
12:06:15 redis_queue.1 | 337718:C 07 Dec 2023 12:06:15.508 # Configuration loaded
12:06:15 redis_queue.1 | 337718:M 07 Dec 2023 12:06:15.509 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:06:15 redis_queue.1 | 337718:M 07 Dec 2023 12:06:15.521 * Running mode=standalone, port=11000.
12:06:15 redis_queue.1 | 337718:M 07 Dec 2023 12:06:15.521 # Server initialized
12:06:15 redis_queue.1 | 337718:M 07 Dec 2023 12:06:15.521 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
12:06:15 redis_queue.1 | 337718:M 07 Dec 2023 12:06:15.521 * Ready to accept connections
12:06:15 system        | redis_cache.1 started (pid=337713)
12:06:15 redis_cache.1 | 337717:C 07 Dec 2023 12:06:15.512 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12:06:15 redis_cache.1 | 337717:C 07 Dec 2023 12:06:15.512 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=337717, just started
12:06:15 redis_cache.1 | 337717:C 07 Dec 2023 12:06:15.512 # Configuration loaded
12:06:15 redis_cache.1 | 337717:M 07 Dec 2023 12:06:15.513 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:06:15 redis_cache.1 | 337717:M 07 Dec 2023 12:06:15.522 * Running mode=standalone, port=13000.
12:06:15 redis_cache.1 | 337717:M 07 Dec 2023 12:06:15.522 # Server initialized
12:06:15 redis_cache.1 | 337717:M 07 Dec 2023 12:06:15.522 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
12:06:15 redis_cache.1 | 337717:M 07 Dec 2023 12:06:15.522 * Ready to accept connections
12:06:15 system        | socketio.1 started (pid=337715)
12:06:15 system        | watch.1 started (pid=337719)
12:06:15 system        | schedule.1 started (pid=337716)
12:06:15 system        | worker.1 started (pid=337726)
12:06:18 socketio.1    | Realtime service listening on:  9000
12:06:20 watch.1       | 
12:06:21 web.1         | WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
12:06:21 web.1         |  * Running on all addresses (0.0.0.0)
12:06:21 web.1         |  * Running on http://127.0.0.1:8000
12:06:21 web.1         |  * Running on http://172.104.179.228:8000
12:06:21 web.1         | Press CTRL+C to quit
12:06:21 web.1         |  * Restarting with watchdog (inotify)
12:06:21 watch.1       | yarn run v1.22.21
12:06:21 watch.1       | warning ../../../package.json: No license field
12:06:21 watch.1       | $ node esbuild --watch --live-reload
12:06:22 web.1         |  * Debugger is active!
12:06:22 web.1         |  * Debugger PIN: 800-197-531
12:06:35 watch.1       | Browserslist: caniuse-lite is outdated. Please run:
12:06:35 watch.1       |   npx update-browserslist-db@latest
12:06:35 watch.1       |   Why you should do it regularly: https://github.com/browserslist/update-db#readme
12:06:57 watch.1       |  ERROR  There was an error during rebuilding changes.
12:06:57 watch.1       | 
12:06:57 watch.1       | Error: The service was stopped
12:06:57 watch.1       |     at Socket.afterClose (/home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:665:18)
12:06:57 watch.1       |     at Socket.emit (node:events:529:35)
12:06:57 watch.1       |     at endReadableNT (node:internal/streams/readable:1368:12)
12:06:57 watch.1       |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
12:06:57 watch.1       |  ERROR  There was an error during rebuilding changes.
12:06:57 watch.1       | 
12:06:57 watch.1       | Error: The service was stopped
12:06:57 watch.1       |     at Socket.afterClose (/home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:665:18)
12:06:57 watch.1       |     at Socket.emit (node:events:529:35)
12:06:57 watch.1       |     at endReadableNT (node:internal/streams/readable:1368:12)
12:06:57 watch.1       |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
12:06:57 watch.1       |  ERROR  There were some problems during build
12:06:57 watch.1       | 
12:06:57 watch.1       | Error: The service was stopped
12:06:57 watch.1       |     at /home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1356:25
12:06:57 watch.1       |     at /home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:678:9
12:06:57 watch.1       |     at Socket.afterClose (/home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:656:7)
12:06:57 watch.1       |     at Socket.emit (node:events:529:35)
12:06:57 watch.1       |     at endReadableNT (node:internal/streams/readable:1368:12)
12:06:57 watch.1       |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
12:06:57 watch.1       | /home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1660
12:06:57 watch.1       |   for (const message of messages) {
12:06:57 watch.1       |                         ^
12:06:57 watch.1       | 
12:06:57 watch.1       | TypeError: messages is not iterable
12:06:57 watch.1       |     at sanitizeMessages (/home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1660:25)
12:06:57 watch.1       |     at Object.formatMessages2 [as formatMessages] (/home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1458:18)
12:06:57 watch.1       |     at /home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:2146:55
12:06:57 watch.1       |     at new Promise (<anonymous>)
12:06:57 watch.1       |     at Object.formatMessages (/home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:2146:14)
12:06:57 watch.1       |     at Object.formatMessages (/home/yinwai/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1959:70)
12:06:57 watch.1       |     at notify_redis (/home/yinwai/frappe-bench/apps/frappe/esbuild/esbuild.js:470:33)
12:06:57 watch.1       |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
12:06:57 watch.1       | 
12:06:57 watch.1       | Node.js v18.18.2
12:06:57 watch.1       | error Command failed with exit code 1.
12:06:57 watch.1       | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
12:06:58 system        | watch.1 stopped (rc=0)
12:06:58 system        | sending SIGTERM to redis_cache.1 (pid 337713)
12:06:58 system        | sending SIGTERM to redis_queue.1 (pid 337712)
12:06:58 system        | sending SIGTERM to web.1 (pid 337714)
12:06:58 system        | sending SIGTERM to socketio.1 (pid 337715)
12:06:58 system        | sending SIGTERM to schedule.1 (pid 337716)
12:06:58 system        | sending SIGTERM to worker.1 (pid 337726)
12:06:58 redis_cache.1 | 337717:signal-handler (1701950818) Received SIGTERM scheduling shutdown...
12:06:58 redis_queue.1 | 337718:signal-handler (1701950818) Received SIGTERM scheduling shutdown...
12:06:58 redis_cache.1 | 337717:M 07 Dec 2023 12:06:58.408 # User requested shutdown...
12:06:58 system        | schedule.1 stopped (rc=-15)
12:06:58 redis_queue.1 | 337718:M 07 Dec 2023 12:06:58.401 # User requested shutdown...
12:06:58 system        | worker.1 stopped (rc=-15)
12:06:58 redis_cache.1 | 337717:M 07 Dec 2023 12:06:58.408 * Removing the pid file.
12:06:58 redis_cache.1 | 337717:M 07 Dec 2023 12:06:58.408 # Redis is now ready to exit, bye bye...
12:06:58 system        | redis_cache.1 stopped (rc=-15)
12:06:58 system        | socketio.1 stopped (rc=-15)
12:06:58 redis_queue.1 | 337718:M 07 Dec 2023 12:06:58.401 * Removing the pid file.
12:06:58 redis_queue.1 | 337718:M 07 Dec 2023 12:06:58.403 # Redis is now ready to exit, bye bye...
12:06:58 system        | redis_queue.1 stopped (rc=-15)
12:06:59 system        | web.1 stopped (rc=-15)

System:
VM: Ubuntu 22.04.3 LTS
npm version: 10.2.4
yarn version: 1.22.21
nvm version: 0.33.11
node version: 18.18.2

Any pointers for the next step are much appreciated. Thanks!

1 Like
21:31:34 watch.1       |
21:31:34 watch.1       | Error: The service was stopped
21:31:34 watch.1       |     at Socket.afterClose (/home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:665:18)
21:31:34 watch.1       |     at Socket.emit (node:events:529:35)
21:31:34 watch.1       |     at endReadableNT (node:internal/streams/readable:1368:12)
21:31:34 watch.1       |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
21:31:35 watch.1       |  ERROR  There was an error during rebuilding changes.
21:31:35 watch.1       |
21:31:35 watch.1       | Error: The service was stopped
21:31:35 watch.1       |     at Socket.afterClose (/home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:665:18)
21:31:35 watch.1       |     at Socket.emit (node:events:529:35)
21:31:35 watch.1       |     at endReadableNT (node:internal/streams/readable:1368:12)
21:31:35 watch.1       |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
21:31:35 watch.1       |  ERROR  There were some problems during build
21:31:35 watch.1       |
21:31:35 watch.1       | Error: The service was stopped
21:31:35 watch.1       |     at /home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1356:25
21:31:35 watch.1       |     at /home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:678:9
21:31:35 watch.1       |     at Socket.afterClose (/home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:656:7)
21:31:35 watch.1       |     at Socket.emit (node:events:529:35)
21:31:35 watch.1       |     at endReadableNT (node:internal/streams/readable:1368:12)
21:31:35 watch.1       |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
21:31:35 watch.1       | /home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1660
21:31:35 watch.1       |   for (const message of messages) {
21:31:35 watch.1       |                         ^
21:31:35 watch.1       |
21:31:35 watch.1       | TypeError: messages is not iterable
21:31:35 watch.1       |     at sanitizeMessages (/home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1660:25)
21:31:35 watch.1       |     at Object.formatMessages2 [as formatMessages] (/home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1458:18)
21:31:35 watch.1       |     at /home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:2146:55
21:31:35 watch.1       |     at new Promise (<anonymous>)
21:31:35 watch.1       |     at Object.formatMessages (/home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:2146:14)
21:31:35 watch.1       |     at Object.formatMessages (/home/talktoprathik/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1959:70)
21:31:35 watch.1       |     at notify_redis (/home/talktoprathik/frappe-bench/apps/frappe/esbuild/esbuild.js:470:33)
21:31:35 watch.1       |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
21:31:35 watch.1       |
21:31:35 watch.1       | Node.js v18.18.2
21:31:35 watch.1       | error Command failed with exit code 1.
21:31:35 watch.1       | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

hey, are you having the same issue?

hi @wanyinwai

have you found solution for above issue?
I am getting same issue in these config:

System:

VM: Ubuntu 22.04.3 LTS
npm version: 10.2.4
yarn version: 1.22.21
nvm version: 0.39.7
node version: v20.11.0