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
Related
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
I tried installing SASS, I tried reinstalling Node, I tried NPM install globally.
I made this project a few months ago. I cloned it from GitHub and it seems to be okay as far as that goes.
I also keep getting this error when trying to npm start the application:
'react-scripts' is not recognized as an internal or external command, operable program or batch file.
npm ERR! code 1
npm ERR! path C:\Users\Dylan\Documents\ALL CODE\national-parks\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\Dylan\Documents\ALL CODE\national-parks\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\\Dylan\\Documents\\ALL CODE\\national-parks\\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.1 | 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\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\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\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\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\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\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\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Dylan\Documents\ALL CODE\national-parks\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\Dylan\Documents\ALL CODE\national-parks\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (C:\Users\Dylan\Documents\ALL CODE\national-parks\node_modules\graceful-fs\polyfills.js:299: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:\\Users\\Dylan\\Documents\\ALL CODE\\national-parks\\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\Dylan\Documents\ALL CODE\national-parks\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.15.1
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\Dylan\AppData\Local\npm-cache\_logs\2022-10-04T19_51_13_932Z-debug-0.log
You can follow the pointers in the npm error log. It tells you that python is not found on your system. Try to install python2 (see the EOL release https://www.python.org/downloads/release/python-2718/), then see what npm tells you.
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
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
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/