NPM install errors on node-sass - node.js

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.

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

npm install with error: `gyp` failed with exit code: 1 | npm ERR! Build failed with error code: 1

I try to install modules on windows 11 using npm 8.5.5. When i enter npm install i get :
npm ERR! code 1
npm ERR! path C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\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\faris\Downloads\learnplus\learnplus-v4.4.0\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\\faris\\Downloads\\learnplus\\learnplus-v4.4.0\\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 | 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\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\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\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\faris\Downloads\learnplus\learnplus-v4.4.0\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\faris\AppData\Local\Programs\Python\Python37\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Users\faris\AppData\Local\Programs\Python\Python37\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:398:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\faris\\Downloads\\learnplus\\learnplus-v4.4.0\\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\faris\Downloads\learnplus\learnplus-v4.4.0\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
It seems like node-sass install error. The environment is below:
npm version: 8.5.5
system : windows 11
node version: 16.15.0
I'm trying to install the gym in npm with command npm install gyp, but there is still the same error. Then, i'm trying to install with the command npm i gyp, but there is still the same error.

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

Resources