Error after latest bench update

Hi, Started getting this error about 4 days ago on a production environment on the official VM image. We have not done any customization or anything strange. Just a plain vanilla install and we try to regularly do a bench update. any help much appreciated.

frappe@erpnext:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream master
From https://github.com/frappe/frappe

  • branch master -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From https://github.com/frappe/erpnext
  • branch master -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext_demo
    INFO:bench.utils:git pull upstream master
    From https://github.com/frappe/erpnext_demo
  • branch master -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/bench-repo/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext_demo/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    Backing up sites…
    Patching sites…
    Migrating erpnext.vm
    Updating DocTypes for frappe : [========================================]
    Updating DocTypes for erpnext : [========================================]
    Syncing help database…
    Traceback (most recent call last):
    File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
    main”, fname, loader, pkg_name)
    File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
    exec code in run_globals
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 16, in build
    frappe.build.bundle(False, make_copy=make_copy, verbose=verbose)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/build.py”, line 37, in bundle
    subprocess.call(command.split(’ '))
    File “/usr/lib/python2.7/subprocess.py”, line 522, in call
    return Popen(*popenargs, **kwargs).wait()
    File “/usr/lib/python2.7/subprocess.py”, line 710, in init
    errread, errwrite)
    File “/usr/lib/python2.7/subprocess.py”, line 1327, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory

Hi @betabrain,

Kindly ensure your sites folder has sub folders assets/erpnext and assets/frappe/.

If not then make soft link in assets using command given below

**ln - s /home/<username>/frappe-bench/app/frappe/frappe/public/       /home/<username>/frappe-bench/sites/assets/frappe** 
**ln - s /home/<username>/frappe-bench/app/erpnext/erpnext/public/     /home/<username>/frappe-bench/sites/assets/erpnext** 

After creating soft link then try to run bench build inside frappe-bench.

Regards
Navdeep

The version of node installed on your computer is probably version 4.X. Upgrade node to version <= 6.X

2 Likes

Thanks! This was it!

After doing a apt-get update, upgrade I ran the following to update node:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Then ran a bench update and all worked fine.

2 Likes