Can't install ERPNext on Mac

I’m trying to install ERPNext using The Hitchhiker’s Guide to Installing Frappé on Mac OS X

but i’m getting below error

2 warnings and 5 errors generated. make: *** [Release/obj.target/binding/src/binding.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/sagar/frappe-bench/apps/frappe/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:200:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Darwin 18.6.0 gyp ERR! command “/usr/local/Cellar/node/12.3.1/bin/node” “/Users/sagar/frappe-bench/apps/frappe/node_modules/node-gyp/bin/node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=” gyp ERR! cwd /Users/sagar/frappe-bench/apps/frappe/node_modules/node-sass gyp ERR! node -v v12.3.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1

Python Traceback

Traceback (most recent call last): File “/usr/local/bin/bench”, line 11, in load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)() File “/Users/sagar/bench-repo/bench/cli.py”, line 40, in cli bench_command() File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 764, in call return self.main(*args, **kwargs) File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 717, in main rv = self.invoke(ctx) File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke return callback(*args, **kwargs) File “/Users/sagar/bench-repo/bench/commands/make.py”, line 30, in init python = python) File “/Users/sagar/bench-repo/bench/utils.py”, line 83, in init update_node_packages(bench_path=path) File “/Users/sagar/bench-repo/bench/utils.py”, line 452, in update_node_packages update_yarn_packages(bench_path) File “/Users/sagar/bench-repo/bench/utils.py”, line 465, in update_yarn_packages exec_cmd(‘yarn install’, cwd=app_path) File “/Users/sagar/bench-repo/bench/utils.py”, line 159, in exec_cmd raise CommandFailedError(cmd) bench.utils.CommandFailedError: yarn install

Github Issue:

Can anyone help?
MacOS Mojave 10.14.5

For voordev to post here to seek help here would help?

"
I love what the software can do but the installation is the worst and uttermost worst experience I ever had. The installation is totally unaccaptable getting error after error.
"

Yes various reports confirm that direct installs on MacOS can be a problem.

So maybe then try the VM install route.

ERPNext and Frappe are pretty big and complex tools. They work well, but the downside for the capability and stability is a lack of flexibility.

There aren’t really any Linux binaries involved as far as I know, but from my experience I would suggest sticking to not only GNU/Linux, but specifically Ubuntu, maybe Debian. at least unless you are pretty familiar with the entire stack so you can troubleshoot.

Yes what a frustrated quandary Windows and Mac users are obliged to accept, that their $$$ environments represent proprietary walled garden ecosystems.

1 Like

Can anyone give me a solution for this issue?
I also tried Easy Install but no luck

One option is to install virtual box and run it on that.

Explore this forum and the web for clues and learnings.

This may help Turning a Mac into a Frappe Framework Developer Machine · frappe/bench Wiki · GitHub

Thank you @clarkej But getting same error

Whereas your environment reports node v12.3.1, a current ERPNext has this installed

frappe@ubuntu:~/frappe-bench$ node --version
v6.13.1

This list several branches Previous Releases | Node.js

Exactly how to switch node branches you will need to research - you want to preserve and not break your MacOS environment.

edit: netchampfaris advises running node 8.12.0 or greater here Cannot find module 'rollup' - #10 by netchampfaris

1 Like

Thank you @clarkej Issue has been resolved

For Solution:
Follow instruction from this WIKI

If similar Error arrived, Please Downgrade Node Version

downgrade node version to node@10

brew uninstall node
brew install node@10
brew link --force --overwrite node@10

and than

bench init frappe-bench

2 Likes

That’s good news - please post any references, pointers or resource tips you used to resolve that -

Some day you and other fellow Mac users may be glad you did that!

1 Like