errors while Installing Ngx-Admin - node.js

I'm new to Angular and try to install ngx-admin template but I got these errors. how to fix these errors?
npm WARN deprecated uuid#3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated coffee-script#1.12.7: CoffeeScript on NPM `enter code here`has moved to "coffeescript" (no hyphen)
npm WARN deprecated #types/googlemaps#3.43.3: Types for the Google Maps browser API have moved to #types/google.maps. Note: these types are not for the googlemaps npm package, which is a Node API.
npm WARN deprecated viz.js#1.8.0: no longer supported
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated tslint#6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534
for more information.
npm WARN deprecated core-js#2.5.1: core-js#<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because
of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please,
upgrade your dependencies to the actual version of core-js.
npm WARN deprecated ckeditor#4.7.3: We have renamed the #ckeditor package. New versions are available under the #ckeditor4 name.
npm ERR! code 1
npm ERR! path C:\Users\admin\ngx-admin\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\admin\ngx-admin\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\\admin\\ngx-admin\\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 | 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\admin\ngx-admin\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\admin\ngx-admin\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\admin\ngx-admin\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\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\admin\ngx-admin\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\admin\ngx-admin\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\admin\ngx-admin\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\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` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\admin\ngx-admin\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\admin\ngx-admin\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\admin\ngx-admin\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\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 python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\admin\ngx-admin\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\admin\ngx-admin\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\admin\ngx-admin\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\admin\ngx-admin\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 "python". checking python launcher
npm ERR! gyp verb could not find "python". 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 "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\admin\ngx-admin\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\admin\ngx-admin\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at C:\Users\admin\ngx-admin\node_modules\graceful-fs\polyfills.js:284:29
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\ngx-admin\\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\admin\ngx-admin\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
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Local\npm-cache\_logs\2022-03-21T06_59_03_785Z-debug-0.log

Just remove node-sass from package.json then run npm i -f he will work fine.

To fix node-sass issue, change "node-sass": "xx.xx.x" to "sass": "^1.49.0" in the package.json file in the root of the project. Then run npm i to install new packages.
Though node-sass may be not the only issue with ngx-admin to make it run nowadays.

try this: yarn add node-sass then yarn it works for me

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

Laravel with Vue getting some error after run npm install

This is my project that uses the old package and I trying to set up for development to update some feature functions When running npm install I am getting the error message.
I use the Laravel 5.8
Node v18.10.0
npm v8.19.2
Here is the message error after running npm install.
npm ERR! path /Users/gms-admin/Desktop/Development/khm-billing/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /Users/gms-admin/Desktop/Development/khm-billing/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/local/bin/node',
npm ERR! gyp verb cli '/Users/gms-admin/Desktop/Development/khm-billing/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.15.0 | darwin | 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 (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/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 python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/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 verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/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 python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /Users/gms-admin/Desktop/Development/khm-billing/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 "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack at F (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack at E (/Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /Users/gms-admin/Desktop/Development/khm-billing/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Darwin 21.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/gms-admin/Desktop/Development/khm-billing/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/gms-admin/Desktop/Development/khm-billing/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.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
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gms-admin/.npm/_logs/2022-09-30T03_16_27_848Z-debug-0.log
Please help, appreciated for helping me thanks.
I already solve this issue by downgrade note js
nvm install 13.14.0
nvm use 13.14.0
and remove node_module and package.lock.josn
npm install
Note: I use Laradock with Docker
first, delete node_modules folder.
then run => npm config set python "C:\Python27\python.exe"
and the last one is running => npm install --global windows-build-tools
You have two options here for solve your problem regarding python module path.
Option 1 :
You need to install windows-build-tools and then Your error will be solved. Just run this command in your terminal.
npm i windows-build-tools
Option 2 :
You just need to Install Python In Your PC ( If Not Installed ) and then add python to your PATH variable. Using environment variable.
npm config set python /path/to/python.exe

Problem with npm install on frontend part of project

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

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

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