When I convert branch from develop to version-13 I got so many errors

error /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/node-sass
Output:
Building: /Users/hercules/.nvm/versions/node/v16.18.1/bin/node /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli ‘/Users/hercules/.nvm/versions/node/v16.18.1/bin/node’,
gyp verb cli ‘/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/node-gyp/bin/node-gyp.js’,
gyp verb cli ‘rebuild’,
gyp verb cli ‘–verbose’,
gyp verb cli ‘–libsass_ext=’,
gyp verb cli ‘–libsass_cflags=’,
gyp verb cli ‘–libsass_ldflags=’,
gyp verb cli ‘–libsass_library=’
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@16.18.1 | darwin | arm64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing “build” directory
gyp verb command configure []
gyp verb check python checking for Python executable “python2” in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:13:12)
gyp verb which failed at F (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:68:19)
gyp verb which failed at E (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:80:29)
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:89:16
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/index.js:42:5
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/mode.js:8:5
gyp verb which failed at FSReqCallback.oncomplete (node:fs:202:21)
gyp verb which failed python2 Error: not found: python2
gyp verb which failed at getNotFoundError (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:13:12)
gyp verb which failed at F (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:68:19)
gyp verb which failed at E (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:80:29)
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:89:16
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/index.js:42:5
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/mode.js:8:5
gyp verb which failed at FSReqCallback.oncomplete (node:fs:202:21) {
gyp verb which failed code: ‘ENOENT’
gyp verb which failed }
gyp verb check python checking for Python executable “python” in the PATH
gyp verb which failed Error: not found: python
gyp verb which failed at getNotFoundError (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:13:12)
gyp verb which failed at F (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:68:19)
gyp verb which failed at E (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:80:29)
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:89:16
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/index.js:42:5
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/mode.js:8:5
gyp verb which failed at FSReqCallback.oncomplete (node:fs:202:21)
gyp verb which failed python Error: not found: python
gyp verb which failed at getNotFoundError (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:13:12)
gyp verb which failed at F (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:68:19)
gyp verb which failed at E (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:80:29)
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:89:16
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/index.js:42:5
gyp verb which failed at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/mode.js:8:5
gyp verb which failed at FSReqCallback.oncomplete (node:fs:202:21) {
gyp verb which failed code: ‘ENOENT’
gyp verb which failed }
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder. (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:80:29)
gyp ERR! stack at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/which/which.js:89:16
gyp ERR! stack at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/index.js:42:5
gyp ERR! stack at /Users/hercules/Dev/kyc-bench/apps/frappe/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (node:fs:202:21)
gyp ERR! System Darwin 22.1.0
gyp ERR! command “/Users/hercules/.nvm/versions/node/v16.18.1/bin/node” “/Users/hercules/Dev/kyc-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/hercules/Dev/kyc-bench/apps/frappe/node_modules/node-sass
gyp ERR! node -v v16.18.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

ERROR:
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.10/bin/bench”, line 8, in
sys.exit(cli())
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/cli.py”, line 127, in cli
bench_command()
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/commands/update.py”, line 59, in update
update(
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/utils/bench.py”, line 425, in update
bench.setup.requirements()
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/bench.py”, line 449, in requirements
app = App(path_to_app, bench=self.bench, to_clone=False).install(
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/app.py”, line 242, in install
install_app(
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/app.py”, line 581, in install_app
bench.run(“yarn install”, cwd=app_path)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/utils/init.py”, line 155, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

Hi,

Are all the node packages up to date? Try: npm update node-sass node-gyp

For version 13 you need to install Python 2 and add it to the path