Getting an error while trying to install erpnext

bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
INFO:bench.app:getting app erpnext
INFO:bench.utils:git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --depth 1 --origin upstream
Cloning into ‘erpnext’…
remote: Counting objects: 6829, done.
remote: Compressing objects: 100% (6045/6045), done.
remote: Total 6829 (delta 1340), reused 3633 (delta 615), pack-reused 0
Receiving objects: 100% (6829/6829), 213.96 MiB | 389.00 KiB/s, done.
Resolving deltas: 100% (1340/1340), done.
Checking connectivity… done.
Checking out files: 100% (6773/6773), done.
(‘installing’, u’erpnext’)
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q -e ./apps/erpnext --no-cache-dir

frappe@ production /home/santosh/frappe-bench/apps/frappe
FRAPPE_ENV=production node rollup/build.js

/home/santosh/frappe-bench/apps/frappe/rollup/build.js:7
const {
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions…js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

npm ERR! Linux 4.13.0-39-lowlatency
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “run” “production”
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! frappe@ production: FRAPPE_ENV=production node rollup/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frappe@ production script ‘FRAPPE_ENV=production node rollup/build.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the frappe package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! FRAPPE_ENV=production node rollup/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs frappe
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls frappe
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/santosh/frappe-bench/apps/frappe/npm-debug.log

Seems like a problem with node.

What were the steps you performed? Which guide did you follow?

I had the same Issue. But now its fixed please follow the following steps.

Login As Root User or use SUDO

  1. apt upgrade
  2. apt update
  3. adduser frappe (not required if you have added the user during VM setup)
  4. usermod -aG sudo frappe
  5. apt install build-essential
  6. apt install software-properties-common
  7. apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
  8. apt install dirmngr
  9. apt install curl
  10. apt install mariadb-client mariadb-server Test the install: mysql -u root -p
  11. apt install nginx Test the install: http://[IP-NUMBER-OF-INSTALL_SERVER]
  12. curl -sL https://deb.nodesource.com/setup_7.x | sudo bash -
  13. apt install nodejs Test the install: node -v && npm -v
  14. apt install redis-server Test the install: redis-server -v
  15. apt install wkhtmltopdf
  16. apt install git-core (wil
  17. apt install libssl-dev
  18. pip install --upgrade setuptools
  19. pip install MySQL-python --no-use-wheel (Wheel does not have a MySQL-python module yet, so
    it will error if the -no-use-wheel is not flagged)
  20. apt install supervisor (needed for production mode)
  21. npm install -g yarn

Reboot Server

Login as As frappe User

git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo
sudo pip install -e bench-repo
bench init frappe-bench && cd frappe-bench
bench new-site [site-name]
bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
bench --site [site-name] install-app erpnext
sudo bench setup production

1 Like

i think you should follow this guide
https://tech.heliconia.in/erpnext/install-erpnext-in-ubuntu/