bench.exceptions.CommandFailedError ( After running bench update)

gyp ERR! cwd /home/frappe/frappe-bench/apps/frappe/node_modules/node-sass
gyp ERR! node -v v16.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
info Visit yarn install | Yarn for documentation about this
ERROR:
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.6/dist-packages/bench/cli.py”, line 121, in cli
raise e
File “/usr/local/lib/python3.6/dist-packages/bench/cli.py”, line 111, in cli
bench_command()
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 764, in ca ll
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 1137, in inv oke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 1137, in inv oke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 956, in invo ke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 555, in invo ke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/bench/commands/setup.py”, line 15 5, in setup_requirements
bench.setup.requirements(apps=apps)
File “/usr/local/lib/python3.6/dist-packages/bench/utils/render.py”, line 95, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/bench/bench.py”, line 342, in req uirements
App(app, bench=self.bench, to_clone=False).install( skip_assets=True, restar t_bench=False)
File “/usr/local/lib/python3.6/dist-packages/bench/utils/render.py”, line 110, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/bench/app.py”, line 203, in insta ll
restart_bench=restart_bench
File “/usr/local/lib/python3.6/dist-packages/bench/app.py”, line 428, in insta ll_app
bench.run(“yarn install”, cwd=app_path)
File “/usr/local/lib/python3.6/dist-packages/bench/bench.py”, line 43, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File “/usr/local/lib/python3.6/dist-packages/bench/utils/init.py”, line 12 6, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

Tough to say without a bit more information. My guess is you want to check if the version of node-sass (specified in the 'package.json' for Frappe) is compatible with the version of Node you have installed on your machine.

Compatibility matrix here.

From your error text, looks like you have Node v16.15. So you’ll need a ‘node-sass’ of v6.x

2 Likes

I can confirm that I had a lot of trouble with node-sass on node v16. My solution was to use nvm to switch back to node v14.