Can't create Vue project with node-sass - node.js

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

Due to compatibility issues with the Node version (this is especially evident when you try and push a Vue app to Netlify) you are better off using sass - sass-loader.

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

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.

NodeJS old lockfile issue

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

SPFx gulp build fails - related to node-sass

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

errors while installing gulp-sass on linux manjaro

When I try to install gulp-sass, I get a lot of errors. I recently switched to my linux machine from my windows machine, and on windows it worked perfectly fine. Now when I try to install gulp (npm install gulp) it works fine. But when I try to install gulp-sass (npm install gulp-sass) right after that, i get a ton of errors.
npm ERR! code 1
npm ERR! path /home/pera/Desktop/Server/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /home/pera/.nvm/versions/node/v16.3.0/bin/node /home/pera/Desktop/Server/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 '/home/pera/.nvm/versions/node/v16.3.0/bin/node',
npm ERR! gyp verb cli '/home/pera/Desktop/Server/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.3.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 "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (/home/pera/Desktop/Server/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/home/pera/Desktop/Server/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/home/pera/Desktop/Server/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /home/pera/Desktop/Server/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /home/pera/Desktop/Server/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /home/pera/Desktop/Server/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:195:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (/home/pera/Desktop/Server/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/home/pera/Desktop/Server/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/home/pera/Desktop/Server/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /home/pera/Desktop/Server/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /home/pera/Desktop/Server/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /home/pera/Desktop/Server/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:195: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 /usr/bin/python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python -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:326:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! stack at Socket.<anonymous> (node:internal/child_process:453:11)
npm ERR! gyp ERR! stack at Socket.emit (node:events:394:28)
npm ERR! gyp ERR! stack at Pipe.<anonymous> (node:net:661:12)
npm ERR! gyp ERR! System Linux 5.10.36-2-MANJARO
npm ERR! gyp ERR! command "/home/pera/.nvm/versions/node/v16.3.0/bin/node" "/home/pera/Desktop/Server/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/pera/Desktop/Server/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.3.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! /home/pera/.npm/_logs/2021-06-04T21_00_45_303Z-debug.log
From your log:
python2 Error: not found: python2
node-gyp couldn't find python2 so it falls back to /usr/bin/python which will be python3.
Then:
import sys; print "%s.%s.%s" % sys.version_info[:3];
The 'print' syntax changed in python3, so this is no longer valid.
Install Python2 and you'll resolve this error.

Resources