Frappe and ERPN setup shows unexpected end of JSON error, but completes installation

This is the error message during bench init --frappe branch bench installation:

added 487 packages from 272 contributors and audited 3535 packages in 195.975s
found 0 vulnerabilities

/home/frappe/bench/apps/frappe/frappe/build.py:106: UserWarning: Source /home/frappe/bench/apps/frappe_io/frappe_io/docs does not exists.
  warnings.warn('Source {source} does not exists.'.format(source = source))
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at make_build_map (/home/frappe/bench/apps/frappe/frappe/build.js:193:22)
    at Object.<anonymous> (/home/frappe/bench/apps/frappe/frappe/build.js:22:17)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
Wrote css/frappe-web.css - 65.11 KB
Wrote js/frappe-web.min.js - 132.77 KB
Wrote js/control.min.js - 77.1 KB
Wrote js/dialog.min.js - 116.97 KB
Wrote css/desk.min.css - 309.05 KB
Wrote css/frappe-rtl.css - 32.49 KB
Wrote js/libs.min.js - 1.13 MB
Wrote js/desk.min.js - 462.89 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 196.71 KB
Wrote css/list.min.css - 13.36 KB
Wrote js/list.min.js - 154.85 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 260.58 KB
Wrote js/web_form.min.js - 247.55 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
INFO:bench.utils:setting up backups
no crontab for frappe
INFO:bench.utils:setting up auto update
no crontab for frappe
Bench bench initialized

As you can see, bench successfully initialized, so I went ahead to bench get-app erpnext --branch master, but it showed similar errors:

INFO:bench.app:installing foundation
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/foundation 
/home/frappe/bench/apps/frappe/frappe/build.py:106: UserWarning: Source /home/frappe/bench/apps/frappe_io/frappe_io/docs does not exists.
  warnings.warn('Source {source} does not exists.'.format(source = source))
/home/frappe/bench/apps/frappe/frappe/build.py:106: UserWarning: Source /home/frappe/bench/apps/foundation/foundation/docs does not exists.
  warnings.warn('Source {source} does not exists.'.format(source = source))
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at make_build_map (/home/frappe/bench/apps/frappe/frappe/build.js:193:22)
    at Object.<anonymous> (/home/frappe/bench/apps/frappe/frappe/build.js:22:17)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at make_build_map (/home/frappe/bench/apps/frappe/frappe/build.js:193:22)
    at Object.<anonymous> (/home/frappe/bench/apps/frappe/frappe/build.js:22:17)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
Wrote css/frappe-web.css - 65.11 KB
Wrote js/frappe-web.min.js - 132.77 KB
Wrote js/control.min.js - 77.1 KB
Wrote js/dialog.min.js - 116.97 KB
Wrote css/desk.min.css - 309.05 KB
Wrote css/frappe-rtl.css - 32.49 KB
Wrote js/libs.min.js - 1.13 MB
Wrote js/desk.min.js - 462.89 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 196.71 KB
Wrote css/list.min.css - 13.36 KB
Wrote js/list.min.js - 154.85 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 260.58 KB
Wrote js/web_form.min.js - 247.55 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
Wrote css/erpnext.css - 8.1 KB
Wrote js/erpnext-web.min.js - 3.8 KB
Wrote js/erpnext.min.js - 166.15 KB
Wrote js/item-dashboard.min.js - 8.13 KB

Again, the installation mysteriously completes. Can I ignore these errors or will there be issues further down the road?

Hi

The source of the error appears to have been created because the help documentation could not be installed. You can ignore that or you can download the applications for help documents.

1 Like

Oh, thank God it wasn’t anything potentially breaking. How do I download help document application you mention?

Hi

first check the ‘/home/frappe/bench/apps/frappe_io/frappe_io/’ and /home/frappe/bench/apps/foundation/foundation/ check files on the path. If frappe_io and foundation (in ‘/home/frappe/bench/apps/’) applications are not installed, you can install them as follows.

bench get-app frappe_io GitHub - frappe/frappe_io: Website for Frappe

bench get-app foundation GitHub - erpnext/foundation: Website for ERPNext Foundation

You can install applications as above.

1 Like

Both apps are apparently present. So does that mean the docs have been installed or not? Weird.

~/bench$ ls -al apps/frappe_io/frappe_io/
total 52
drwxr-xr-x 10 frappe frappe 4096 Jan 16 22:51 .
drwxr-xr-x  5 frappe frappe 4096 Jan 16 22:47 ..
-rw-r--r--  1 frappe frappe    0 Jan 16 22:47 __init__.py
-rw-r--r--  1 frappe frappe  142 Jan 16 22:51 __init__.pyc
drwxr-xr-x  2 frappe frappe 4096 Jan 16 22:47 config
drwxr-xr-x  2 frappe frappe 4096 Jan 16 22:47 data
drwxr-xr-x  2 frappe frappe 4096 Jan 16 22:47 fixtures
drwxr-xr-x  3 frappe frappe 4096 Jan 16 22:47 frappe_framework
drwxr-xr-x  4 frappe frappe 4096 Jan 16 22:47 frappe_team
-rw-r--r--  1 frappe frappe 3557 Jan 16 22:47 hooks.py
-rw-r--r--  1 frappe frappe   29 Jan 16 22:47 modules.txt
-rw-r--r--  1 frappe frappe    0 Jan 16 22:47 patches.txt
drwxr-xr-x  7 frappe frappe 4096 Jan 16 22:47 public
drwxr-xr-x  5 frappe frappe 4096 Jan 16 22:47 templates
drwxr-xr-x 14 frappe frappe 4096 Jan 16 22:47 www
~/bench$ ls -al apps/foundation/foundation/
total 64
drwxr-xr-x  9 frappe frappe 4096 Jan 17 10:31 .
drwxr-xr-x  6 frappe frappe 4096 Jan 17 10:30 ..
-rw-r--r--  1 frappe frappe 1114 Jan 17 10:30 __init__.py
-rw-r--r--  1 frappe frappe 1706 Jan 17 10:31 __init__.pyc
drwxr-xr-x  2 frappe frappe 4096 Jan 17 10:30 config
drwxr-xr-x  5 frappe frappe 4096 Jan 17 10:30 erpnext_foundation
-rw-r--r--  1 frappe frappe 5010 Jan 17 10:30 hooks.py
-rw-r--r--  1 frappe frappe   36 Jan 17 10:30 migrate.py
-rw-r--r--  1 frappe frappe   18 Jan 17 10:30 modules.txt
drwxr-xr-x  3 frappe frappe 4096 Jan 17 10:30 non_profit
drwxr-xr-x  3 frappe frappe 4096 Jan 17 10:30 patches
-rw-r--r--  1 frappe frappe  168 Jan 17 10:30 patches.txt
drwxr-xr-x  5 frappe frappe 4096 Jan 17 10:30 public
drwxr-xr-x  4 frappe frappe 4096 Jan 17 10:30 templates
drwxr-xr-x 10 frappe frappe 4096 Jan 17 10:30 www

Hi,

Yes applications are installed but both applications are missing the docs folder. You can try to uninstall and reinstall applications. Or you can manually upload the docs folder to directories. normally located in the docs, www folder. it should have found it automatically. You can also try to copy the docs folder from the www directory to the home directory. (for ex: /foundation/foundation/www/docs/ to /foundation/foundation/)

1 Like