hay alguna solucion para este error? Recibo eso mientras ejecuto npm install en centos 7. npm version = 8.5.0 nodejs version = v16.14.1
error de recepción: captura de pantalla
npm ERR! path /usr/share/nginx/html/node_modules/node-sass npm ERR! command failed npm ERR! command sh -c node scripts/build.js npm ERR! Building: /usr/bin/node /usr/share/nginx/html/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm ERR! gyp info it worked if it ends with ok npm ERR! gyp verb cli [ npm ERR! gyp verb cli '/usr/bin/node', npm ERR! gyp verb cli '/usr/share/nginx/html/node_modules/node-gyp/bin/node-gyp.js', npm ERR! gyp verb cli 'rebuild', npm ERR! gyp verb cli '--verbose', npm ERR! gyp verb cli ] npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@16.14.1 | linux | x64 npm ERR! gyp verb command rebuild [] npm ERR! gyp verb command clean [] npm ERR! gyp verb clean removing "build" directory npm ERR! gyp verb command configure [] npm ERR! gyp verb check python checking for Python executable "/usr/bin/python3" in the PATH npm ERR! gyp verb `which` failed Error: not found: /usr/bin/python3 npm ERR! gyp verb `which` failed at /usr/share/nginx/html/node_modules/isexe/index.js:42:5 npm ERR! gyp verb `which` failed at /usr/share/nginx/html/node_modules/isexe/mode.js:8:5 npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) npm ERR! gyp verb `which` failed /usr/bin/python3 Error: not found: /usr/bin/python3 npm ERR! gyp verb `which` failed at getNotFoundError (/usr/share/nginx/html/node_modules/which/which.js:13:12) npm ERR! gyp verb `which` failed at F (/usr/share/nginx/html/node_modules/which/which.js:68:19) npm ERR! gyp verb `which` failed at /usr/share/nginx/html/node_modules/isexe/mode.js:8:5 npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) { npm ERR! gyp verb `which` failed code: 'ENOENT' npm ERR! gyp verb `which` failed } npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Can't find Python executable "/usr/bin/python3", you can set the PYTHON env variable. npm ERR! gyp ERR! stack at E (/usr/share/nginx/html/node_modules/which/which.js:80:29) npm ERR! gyp ERR! System Linux 3.10.0-1160.45.1.el7.x86_64 npm ERR! gyp ERR! command "/usr/bin/node" "/usr/share/nginx/html/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" npm ERR! gyp ERR! cwd /usr/share/nginx/html/node_modules/node-sass npm ERR! gyp ERR! node -v v16.14.1 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok npm ERR! Build failed with error code: 1Parece que tiene un módulo Node que depende de Python. Como está en CentOS, deberá ejecutar:
sudo yum update sudo yum install python3entonces corre
python3 -Vpara verificar que Python está instalado.