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
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
File “/usr/local/lib/python3.6/dist-packages/bench/”, line 121, in cli
raise e
File “/usr/local/lib/python3.6/dist-packages/bench/”, line 111, in cli
File “/usr/local/lib/python3.6/dist-packages/click/”, line 764, in ca ll
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.6/dist-packages/click/”, line 1137, in inv oke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.6/dist-packages/click/”, line 1137, in inv oke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.6/dist-packages/click/”, line 956, in invo ke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.6/dist-packages/click/”, line 555, in invo ke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/bench/commands/”, line 15 5, in setup_requirements
File “/usr/local/lib/python3.6/dist-packages/bench/utils/”, line 95, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/bench/”, 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/”, line 110, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/bench/”, line 203, in insta ll
File “/usr/local/lib/python3.6/dist-packages/bench/”, line 428, in insta ll_app“yarn install”, cwd=app_path)
File “/usr/local/lib/python3.6/dist-packages/bench/”, line 43, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File “/usr/local/lib/python3.6/dist-packages/bench/utils/”, line 12 6, in exec_cmd
raise 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


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.