Problem with npm install on frontend part of project - python-3.x

i get to the problem with test Project. When i try to npm installi get a problem bellow. I set Python2 and Python3 to the PATH and to the config to. And my node-gyp is 9.0.0 and i dont know why is try to build under version 3.8.0.
Project is external only from course.
npm ERR! code 1
npm ERR! path C:\projects\PotterAPI\frontend\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\projects\PotterAPI\frontend\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 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\projects\\PotterAPI\\frontend\\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 '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#16.14.2 | win32 | 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 "C:\Python3" in the PATH
npm ERR! gyp verb `which` failed Error: not found: C:\Python3
npm ERR! gyp verb `which` failed at getNotFoundError (C:\projects\PotterAPI\frontend\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\projects\PotterAPI\frontend\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\projects\PotterAPI\frontend\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\projects\PotterAPI\frontend\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\projects\PotterAPI\frontend\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\projects\PotterAPI\frontend\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed C:\Python3 Error: not found: C:\Python3
npm ERR! gyp verb `which` failed at getNotFoundError (C:\projects\PotterAPI\frontend\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\projects\PotterAPI\frontend\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\projects\PotterAPI\frontend\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\projects\PotterAPI\frontend\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\projects\PotterAPI\frontend\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\projects\PotterAPI\frontend\node_modules\isexe\windows.js:36: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 verb could not find "C:\Python3". checking python launcher
npm ERR! gyp verb could not find "C:\Python3". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "C:\Python3", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\projects\PotterAPI\frontend\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\projects\PotterAPI\frontend\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (C:\projects\PotterAPI\frontend\node_modules\graceful-fs\polyfills.js:295:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\projects\\PotterAPI\\frontend\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\projects\PotterAPI\frontend\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JakubBabcanik\AppData\Local\npm-cache\_logs\2022-04-13T07_53_44_604Z-debug-0.log

You could refer to this but some extracts of this answer are:
1. npm uninstall node-sass
2. npm install sass
Or, if you are using Yarn:
1. yarn remove node-sass
2. yarn add sass

Related

i try to npm install vue app but it broke with gyp error

i try to run npm install a vue app but it broke with gyp i got an error and i can't understand what it need or what i should do
it was working fine i deledted the node_modules directory and tried to npm install again but he swear will never work again 😢
the error:
npm ERR! code 1
npm ERR! path D:\projects\oriento-sellers\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe D:\projects\oriento-sellers\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 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'D:\\projects\\oriento-sellers\\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 '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#16.14.2 | win32 | 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 "python2.7" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2.7
npm ERR! gyp verb `which` failed at getNotFoundError (D:\projects\oriento-sellers\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (D:\projects\oriento-sellers\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (D:\projects\oriento-sellers\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at D:\projects\oriento-sellers\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at D:\projects\oriento-sellers\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at D:\projects\oriento-sellers\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2.7 Error: not found: python2.7
npm ERR! gyp verb `which` failed at getNotFoundError (D:\projects\oriento-sellers\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (D:\projects\oriento-sellers\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (D:\projects\oriento-sellers\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at D:\projects\oriento-sellers\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at D:\projects\oriento-sellers\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at D:\projects\oriento-sellers\node_modules\isexe\windows.js:36: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 verb could not find "python2.7". checking python launcher
npm ERR! gyp verb could not find "python2.7". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (D:\projects\oriento-sellers\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (D:\projects\oriento-sellers\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (D:\projects\oriento-sellers\node_modules\graceful-fs\polyfills.js:306:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\projects\\oriento-sellers\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd D:\projects\oriento-sellers\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mohammed mujahid\AppData\Local\npm-cache\_logs\2022-10-16T10_04_30_456Z-debug-0.log
any one have any solution, i'm tired, it takes four days to now

NodeJS old lockfile issue

I have an Angular site which is built on Node version 8. I have recently upgraded Node on the server and now when I run npm install I get the following errors.
I tried different things already,
I have deleted the package-lock.json file and run that again
I ran "npm install -g npm#"latest-V"".
I tried to delete node-sass and install it again
But every "npm" command ends up with following errors
npm ERR! code 1
npm ERR! path /var/www/web-folder/abc.com/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/bin/node /var/www/web-folder/abc.com/htdocs/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 '/var/www/web-folder/abc.com/htdocs/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 '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#16.14.0 | 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 getNotFoundError (/var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /var/www/web-folder/abc.com/htdocs/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /var/www/web-folder/abc.com/htdocs/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 (/var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /var/www/web-folder/abc.com/htdocs/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /var/www/web-folder/abc.com/htdocs/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 PythonFinder.failNoPython (/var/www/web-folder/abc.com/htdocs/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/var/www/web-folder/abc.com/htdocs/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack at F (/var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack at E (/var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack at /var/www/web-folder/abc.com/htdocs/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack at /var/www/web-folder/abc.com/htdocs/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /var/www/web-folder/abc.com/htdocs/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Linux 3.10.0-862.14.4.el7.x86_64
npm ERR! gyp ERR! command "/usr/bin/node" "/var/www/web-folder/abc.com/htdocs/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /var/www/web-folder/abc.com/htdocs/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

SPFx gulp build fails - related to node-sass

I have not worked with my SPFx projects for a few months. When I try to build now, I get the node-sass errors below. I don't recall making any changes to my environment. I tried downgrading my Node to 14, deleting package-lock.json and reinstalling all my node modules, and no luck. Does anyone have a fix for this?
npm ERR! code 1
npm ERR! path C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_m
odules\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 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\jeff\\source\\atsautomation\\InitiationForm\\node_modules\\#microsoft\\gulp-core-build-sass\\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 '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#14.15.0 | win32 | 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 "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\
node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_modules\wh
ich\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_modules\wh
ich\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_modules\which
\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\
node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_modules\wh
ich\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_modules\wh
ich\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_modules\which
\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Program Files\Inkscape\bin\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Program Files\Inkscape\bin\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jeff\\source\\atsautomation\\InitiationForm\\node_modules\\#microsoft\\gulp-c
ore-build-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_libr
ary="
npm ERR! gyp ERR! cwd C:\Users\jeff\source\atsautomation\InitiationForm\node_modules\#microsoft\gulp-core-build-sass\node_modules\node-sass
npm ERR! gyp ERR! node -v v14.15.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
First thing is that node-sass is deprecated:
npm -g uninstall node-sass
npm install sass
You also need to install gulp-cli, yo and microsoft/generator-sharepoint:
gulp-cli yo #microsoft/generator-sharepoint --global
Last thing, you need to do, but this time in POWERSHELL, in the project folder
gulp trust-dev-cert

Can't create Vue project with node-sass

Just trying to create a with vue create project-name. I include CSS Pre-processors, but I can only successfully create the project with dart-sass, as selecting node-sass gives an error, i.e.:
npm ERR! code 1
npm ERR! path C:\Users\[username]\Documents\vuengo\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\[username]\Documents\vuengo\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 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\[username]\\Documents\\vuengo\\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 '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#16.8.0 | win32 | 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 "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\[username]\Documents\vuengo\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\[username]\Documents\vuengo\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\[username]\Documents\vuengo\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\[username]\Documents\vuengo\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\[username]\Documents\vuengo\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\[username]\Documents\vuengo\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\[username]\Documents\vuengo\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\[username]\Documents\vuengo\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\[username]\Documents\vuengo\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\[username]\Documents\vuengo\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\[username]\Documents\vuengo\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\[username]\Documents\vuengo\node_modules\isexe\windows.js:36: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 verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Users\[username]\AppData\Local\Programs\Python\Python39\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Users\[username]\AppData\Local\Programs\Python\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\[username]\\Documents\\vuengo\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\[username]\Documents\vuengo\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.8.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\[username]\AppData\Local\npm-cache\_logs\2021-09-05T16_28_29_162Z-debug.log
ERROR command failed: npm install --loglevel error --legacy-peer-deps
I've tried everything: updating vue, npm, node.js; setting useTaobaoRegistry to false; cache clean --force, etc etc. Not sure what the issue is / how to read the log. I see it's referring to "python2", when I have python3 installed, is that (part of) the problem? Any ideas anyone?
Due to compatibility issues with the Node version (this is especially evident when you try and push a Vue app to Netlify) you are better off using sass - sass-loader.

How can i fix gulp-sass installation error

I'm new to Gulp and want to install gulp-sass for my project. But it throws error. I tried to install another gulp packages like gulp-uglify, i don't have any trouble about them. It throws error for only gulp-sass. I reinstalled and updated node again but nothing changed. How can i fix this ? This is the error:
PS C:\Users\zenes\Desktop\enestekin> npm install gulp-sass
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path C:\Users\zenes\Desktop\enestekin\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\zenes\Desktop\enestekin\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 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\zenes\\Desktop\\enestekin\\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 '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#15.12.0 | win32 | 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 "/path/to/executable/python2.7" in the PATH
npm ERR! gyp verb `which` failed Error: not found: /path/to/executable/python2.7
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\zenes\Desktop\enestekin\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\zenes\Desktop\enestekin\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\zenes\Desktop\enestekin\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\zenes\Desktop\enestekin\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\zenes\Desktop\enestekin\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\zenes\Desktop\enestekin\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:193:21)
npm ERR! gyp verb `which` failed /path/to/executable/python2.7 Error: not found: /path/to/executable/python2.7
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\zenes\Desktop\enestekin\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\zenes\Desktop\enestekin\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\zenes\Desktop\enestekin\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\zenes\Desktop\enestekin\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\zenes\Desktop\enestekin\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\zenes\Desktop\enestekin\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:193:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "/path/to/executable/python2.7". checking python launcher
npm ERR! gyp verb could not find "/path/to/executable/python2.7". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\zenes\Desktop\enestekin\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\zenes\Desktop\enestekin\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (C:\Users\zenes\Desktop\enestekin\node_modules\graceful-fs\polyfills.js:299:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:193:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\zenes\\Desktop\\enestekin\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\zenes\Desktop\enestekin\node_modules\node-sass
npm ERR! gyp ERR! node -v v15.12.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zenes\AppData\Local\npm-cache\_logs\2021-03-21T14_45_18_130Z-debug.log
What is your node.js version?
I have seen this error when I use node 15.x version.
But after I reinstalled the 14.x version, I can install gulp-sass module successfully.
It is not good to use latest version of Node.js.
For the good experience, it is good to use LTS version(You must do it in production).
https://nodejs.org/en/about/releases/

Resources