ERPNext on UBUNTU 16.04

Good Day

I tried many times to install ERPNext on UBUNTU 16.04 and found the following today:

Tried this 3 Times, but all gave me some error:

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/nodejs’, ‘/usr/bin/npm’, ‘run’, ‘production’ ]
2 info using npm@4.2.0
3 info using node@v7.10.1
4 verbose run-script [ ‘preproduction’, ‘production’, ‘postproduction’ ]
5 info lifecycle frappe@~preproduction: frappe@
6 silly lifecycle frappe@~preproduction: no script for preproduction, continuing
7 info lifecycle frappe@~production: frappe@
8 verbose lifecycle frappe@~production: unsafe-perm in lifecycle true
9 verbose lifecycle frappe@~production: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/albertus/lin-bench/apps/frappe/node_modules/.bin:/home/albertus/bin:/home/albertus/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle frappe@~production: CWD: /home/albertus/lin-bench/apps/frappe
11 silly lifecycle frappe@~production: Args: [ ‘-c’, ‘FRAPPE_ENV=production node rollup/build.js’ ]
12 silly lifecycle frappe@~production: Returned: code: 1 signal: null
13 info lifecycle frappe@~production: Failed to exec production script
14 verbose stack Error: frappe@ production: FRAPPE_ENV=production node rollup/build.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid frappe@
16 verbose cwd /home/albertus/lin-bench/apps/frappe
17 error Linux 4.4.0-116-generic
18 error argv “/usr/bin/nodejs” “/usr/bin/npm” “run” “production”
19 error node v7.10.1
20 error npm v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error frappe@ production: FRAPPE_ENV=production node rollup/build.js
23 error Exit status 1
24 error Failed at the frappe@ production script ‘FRAPPE_ENV=production node rollup/build.js’.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the frappe package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error FRAPPE_ENV=production node rollup/build.js
24 error You can get information on how to open an issue for this project with:
24 error npm bugs frappe
24 error Or if that isn’t available, you can get their info via:
24 error npm owner ls frappe
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]
26 warn Local package.json exists, but node_modules missing, did you mean to install?

Any Help?

Thank You
Albertus Geyser

Hi @Albertus,

why did you not try easyinstall as discribed at the bottem of that page

GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

I lately installed a production environment on debian 9.4 with it so since Ubunto is a debian based dist I would try it

The “Easy Install” method mentioned above by @spa works very well with Ubuntu 16.04

Some VPS service providers skimp a little on the things included with a fresh server so it is also a good idea to run this command before running the script.

sudo apt-get install build-essential python-setuptools

After the above command the script works very well on all of the hosts I have tried so far.

One last thing…

It is a good idea to get in the habit of calling out the user account you wish to install the frappe framework and the erpnext app. To do this with the script use the --user switch. It would look like this:

sudo python --production --user [linux_username]

Hope this helps.



Good Day

Thank you helped.