Bench init frappe-bench - Command Error

Hi all,
While installing latest frappe, on mu ubnuntu 16.04 I got the following error.
Can somebody help me to install it correctly please?

i have run the following command
bench init frappe-bench --frappe-branch master && cd frappe-bench

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.1
npm WARN frappe@ No description
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, 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/amalendu/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/amalendu/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/amalendu/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/amalendu/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/amalendu/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/amalendu/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/amalendu/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/amalendu/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/amalendu/erpnext/frappe-bench/apps/frappe/frappe/commands/utils.py", line 16, in build
    frappe.build.bundle(False, make_copy=make_copy, verbose=verbose)
  File "/home/amalendu/erpnext/frappe-bench/apps/frappe/frappe/build.py", line 37, in bundle
    subprocess.call(command.split(' '))
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

i got this error for an hour and im trying to solve it !!

upgrade node to version >= 6.X

2 Likes

but it was working good before !!?

ahmad@ahmad-GE60-2PC:~/benches-workspace/testing-benchs$ bench init raghebccv
INFO:bench.utils:virtualenv -q env -p /usr/bin/python
Already using interpreter /usr/bin/python
INFO:bench.utils:./env/bin/pip -q install --upgrade pip
INFO:bench.utils:./env/bin/pip -q install wheel
INFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --origin upstream
Cloning into ‘frappe’…
remote: Counting objects: 128082, done.
remote: Compressing objects: 100% (61/61), done.
remote: Total 128082 (delta 30), reused 27 (delta 14), pack-reused 128007
Receiving objects: 100% (128082/128082), 97.20 MiB | 79.00 KiB/s, done.
Resolving deltas: 100% (96427/96427), done.
Checking connectivity… done.
(‘installing’, u’frappe’)
INFO:bench.app:installing frappe
INFO:bench.utils:raghebccv/env/bin/pip install -q -e raghebccv/apps/frappe --no-cache-dir
INFO:bench.utils:npm install socket.io redis express superagent cookie
npm WARN deprecated isarray@2.0.1: Just use Array.isArray directly
ahmad@1.0.0 /home/ahmad
├─┬ express@4.15.3
│ └── cookie@0.3.1
├── redis@2.7.1
├── socket.io@2.0.1
└── superagent@3.5.2

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN ahmad@1.0.0 No description
npm WARN ahmad@1.0.0 No repository field.
module.js:471
throw err;
^

Error: Cannot find module ‘less’
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/ahmad/benches-workspace/testing-benchs/raghebccv/apps/frappe/frappe/build.js:4:14)
at Module._compile (module.js:570:32)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
INFO:bench.utils:setting up backups
INFO:bench.utils:setting up auto update
Bench raghebccv initialized

Hello @tundebabzy

Thank you
I could install bench after running out the below commands

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

@ahmadRagheb try to install node and check. Now I installed bench without any error!

1 Like

i updated node with the same commands , now installing bench and let’s see :stuck_out_tongue:

i still have the same problem module.js:471
throw err;
^