I am getting NPM error in my Azure devops pipeline - npm-install

How do i fix the npm error in my pipeline?
/opt/hostedtoolcache/node/16.13.2/x64/bin/npm ci
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code 1
npm ERR! path /home/vsts/work/1/s/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /opt/hostedtoolcache/node/16.13.2/x64/bin/node /home/vsts/work/1/s/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 '/opt/hostedtoolcache/node/16.13.2/x64/bin/node',
npm ERR! gyp verb cli '/home/vsts/work/1/s/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.13.2 | 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/vsts/work/1/s/node_modules/which/which.js:13:12)
npm ERR! gyp verb which failed at F (/home/vsts/work/1/s/node_modules/which/which.js:68:19)
npm ERR! gyp verb which failed at E (/home/vsts/work/1/s/node_modules/which/which.js:80:29)
npm ERR! gyp verb which failed at /home/vsts/work/1/s/node_modules/which/which.js:89:16
npm ERR! gyp verb which failed at /home/vsts/work/1/s/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which failed at /home/vsts/work/1/s/node_modules/isexe/mode.js:8:5
I am trying npm clean install but this is failing.

Related

I get the following error when I run "npm install" on Ubuntu

I get the following error when I try to run npm install on Ubuntu. I'm trying to configure Ruby on rails on my system. Can anyone help me to solve it?
jbn9062#OMEN:~/ReactTester$ npm install
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated eslint-loader#1.9.0: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar#1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated babel-eslint#7.2.3: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated html-webpack-plugin#3.2.0: 3.x is no longer supported
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uglify-es#3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated core-js#2.6.12: core-js#<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /home/jbn9062/ReactTester/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh /tmp/postinstall-fe92bafd.sh
npm ERR! Building: /home/jbn9062/.nvm/versions/node/v18.7.0/bin/node /home/jbn9062/ReactTester/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/jbn9062/.nvm/versions/node/v18.7.0/bin/node',
npm ERR! gyp verb cli '/home/jbn9062/ReactTester/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#18.7.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/jbn9062/ReactTester/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/home/jbn9062/ReactTester/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/home/jbn9062/ReactTester/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:211:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (/home/jbn9062/ReactTester/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/home/jbn9062/ReactTester/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/home/jbn9062/ReactTester/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:211: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 (/home/jbn9062/ReactTester/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/home/jbn9062/ReactTester/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/home/jbn9062/ReactTester/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:211:21)
npm ERR! gyp verb `which` failed python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (/home/jbn9062/ReactTester/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/home/jbn9062/ReactTester/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/home/jbn9062/ReactTester/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /home/jbn9062/ReactTester/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:211: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 (/home/jbn9062/ReactTester/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/home/jbn9062/ReactTester/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack at F (/home/jbn9062/ReactTester/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack at E (/home/jbn9062/ReactTester/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack at /home/jbn9062/ReactTester/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack at /home/jbn9062/ReactTester/node_modules/isexe/index.js:42:5
npm ERR! gyp Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jbn9062/.npm/_logs/2022-08-05T09_45_54_430Z-debug-0.log

npm install err when trying to npm install inside amigoscode/javascript

enter image description hereim trying to install npm inside amigocode javascrip file but keep getting this.
npm ERR! code 1
npm ERR! path R:\amigojs\javascript\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: R:\node.exe R:\amigojs\javascript\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 'R:\node.exe',
npm ERR! gyp verb cli
'R:\amigojs\javascript\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 (R:\amigojs\javascript\node_modules\which\which.js:13:12)
npm ERR! gyp verb which failed at F (R:\amigojs\javascript\node_modules\which\which.js:68:19)
npm ERR! gyp verb which failed at E (R:\amigojs\javascript\node_modules\which\which.js:80:29)
npm ERR! gyp verb which failed at R:\amigojs\javascript\node_modules\which\which.js:89:16
npm ERR! gyp verb which failed at R:\amigojs\javascript\node_modules\isexe\index.js:42:5
npm ERR! gyp verb which failed at R:\amigojs\javascript\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 (R:\amigojs\javascript\node_modules\which\which.js:13:12)
npm ERR! gyp verb which failed at F (R:\amigojs\javascript\node_modules\which\which.js:68:19)
npm ERR! gyp verb which failed at E (R:\amigojs\javascript\node_modules\which\which.js:80:29)
npm ERR! gyp verb which failed at R:\amigojs\javascript\node_modules\which\which.js:89:16
npm ERR! gyp verb which failed at R:\amigojs\javascript\node_modules\isexe\index.js:42:5
npm ERR! gyp verb which failed at R:\amigojs\javascript\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb which failed at enter code hereFSReqCallback.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:\Python310\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed:
C:\Python310\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "", 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: Missing parentheses in call to 'print'. Did you mean print(...)?
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 "R:\node.exe"
"R:\amigojs\javascript\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd R:\amigojs\javascript\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:

Mac m1 installing nodes_modules and sass not working

I'm trying to install npm on my project, 'npm install' doesnt work.
this is what my term return :
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path /Users/thibaultvigneron/Documents/Projets/portfolio/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/thibaultvigneron/Documents/Projets/portfolio/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/thibaultvigneron/Documents/Projets/portfolio/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 | darwin | arm64
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:python27python.exe" in the PATH
npm ERR! gyp verb whichfailed Error: not found: c:python27python.exe
npm ERR! gyp verbwhichfailed at getNotFoundError (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:13:12)
npm ERR! gyp verbwhichfailed at F (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:68:19)
npm ERR! gyp verbwhichfailed at E (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:80:29)
npm ERR! gyp verbwhichfailed at /Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:89:16
npm ERR! gyp verbwhichfailed at /Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/isexe/index.js:42:5
npm ERR! gyp verbwhichfailed at /Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/isexe/mode.js:8:5
npm ERR! gyp verbwhichfailed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verbwhichfailed c:python27python.exe Error: not found: c:python27python.exe
npm ERR! gyp verbwhichfailed at getNotFoundError (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:13:12)
npm ERR! gyp verbwhichfailed at F (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:68:19)
npm ERR! gyp verbwhichfailed at E (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:80:29)
npm ERR! gyp verbwhichfailed at /Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:89:16
npm ERR! gyp verbwhichfailed at /Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/isexe/index.js:42:5
npm ERR! gyp verbwhichfailed at /Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/isexe/mode.js:8:5
npm ERR! gyp verbwhichfailed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verbwhichfailed code: 'ENOENT'
npm ERR! gyp verbwhich` failed }
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "c:python27python.exe", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack at F (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack at E (/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack at /Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack at /Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /Users/thibaultvigneron/Documents/Projets/portfolio/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.4.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/thibaultvigneron/Documents/Projets/portfolio/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/thibaultvigneron/Documents/Projets/portfolio/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! /Users/thibaultvigneron/.npm/_logs/2022-04-05T09_29_43_825Z-debug-0.log`
I have installed node v16.14 with nvm.
Try pyenv to manage your python environment.
Install pyenv
brew update
brew install pyenv
echo 'eval "$(pyenv init -)"' >> ~/.profile
Install python2
pyenv install 2.7.18
pyenv global system 2.7.18
Based on the line Error: Can't find Python executable "c:python27python.exe", you can set the PYTHON env variable., you should install Python for Windows Python.
Maybe your Python environment is not well set. Ensure the path to the Python binary is well configured.
check this out based on your error SS so far I have found this article
https://github.com/sass/embedded-host-node/issues/66
https://developpaper.com/mac-m1-arm-npm-install-error-handling/

Cannot run package installation and run serve the application with npm

I'm trying to run this sample I found. This is a solution with .netcore for the backend and Vuejs for the front-end.
I want to start the Vuejs app simply running npm run serve got this error:
PS C:\Users\xxx\Downloads\VueApp> npm run serve
> vue-argon-dashboard#0.1.0 serve
> vue-cli-service serve
'vue-cli-service' is not recognized as an internal or external command,
operable program or batch file.
Then when I try to run npm i.
I got the following output:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vue-argon-dashboard#0.1.0
npm ERR! Found: eslint#7.32.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^7.3.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#">= 1.6.0 < 7.0.0" from #vue/cli-plugin-eslint#4.5.15
npm ERR! node_modules/#vue/cli-plugin-eslint
npm ERR! dev #vue/cli-plugin-eslint#"^4.4.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
This is the package.json:
Try deleting the node_modules folder and after that run npm i from the cmd.
There was a lock into the root project directory. I deleted it and run npm i --force. unfortunately, it got more other different errors
npm ERR! code 1
npm ERR! path C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\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\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\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\\Bruno\\Downloads\\vue-argon-dashboard-asp-net-master\\vue-argon-dashboard-asp-net-master\\Vue\\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.13.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\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\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\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\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\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\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\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\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\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at C:\Users\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\graceful-fs\polyfills.js:282:31
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\\Bruno\\Downloads\\vue-argon-dashboard-asp-net-master\\vue-argon-dashboard-asp-net-master\\Vue\\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\Bruno\Downloads\vue-argon-dashboard-asp-net-master\vue-argon-dashboard-asp-net-master\Vue\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.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

When I run the npm install gulp-sass I get this error?

I get this error after running the command npm install gulp-sass I spend a lot of time to fix this bug but haven't succeeded. If anyone have an idea how to resolve this let me know.
Thank you so much.
I working on the personal project now I can't do anymore because I want to fix this first let me know what should I do.
npm ERR! code 1
npm ERR! path C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\gulp-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\Ramish Hassan Riaz\Desktop\website-components\node_modules\gulp-sass\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\\Ramish Hassan Riaz\\Desktop\\website-components\\node_modules\\gulp-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#15.11.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\Ramish Hassan Riaz\Desktop\website-components\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:200:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Ramish Hassan Riaz\Desktop\website-components\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:200: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:\Python39\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\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:326:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067: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.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Ramish Hassan Riaz\\Desktop\\website-components\\node_modules\\gulp-sass\\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\Ramish Hassan Riaz\Desktop\website-components\node_modules\gulp-sass\node_modules\node-sass
npm ERR! gyp ERR! node -v v15.11.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\Ramish Hassan Riaz\AppData\Local\npm-cache\_logs\2021-03-18T07_14_06_749Z-debug.log`enter code here`
try it, it's work for me!
1-
$ npm uninstall gulp gulp-sass
2- run this code
$ npm install --global --production windows-build-tools
3- reinstall gulp gulp-sass
$ npm install gulp gulp-sass