Mac m1 installing nodes_modules and sass not working - npm

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/

Related

I am getting NPM error in my Azure devops pipeline

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.

There are too many problems with the installation "npm install nodegit"

PS P:\CSS-Strategy> git --version
git version 2.36.1.windows.1
PS P:\CSS-Strategy> npm --version
8.13.2
PS P:\CSS-Strategy> node --version
v16.17.0
PS P:\CSS-Strategy> npm install nodegit
npm WARN deprecated har-validator#5.1.5: this library 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 node-pre-gyp#0.13.0: Please upgrade to #mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the #mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path P:\CSS-Strategy\node_modules\nodegit
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\junu\AppData\Local\Temp\install6629975969.cmd
npm ERR! [nodegit] Running pre-install script
npm ERR! [nodegit] Running install script
npm ERR! Failed to execute 'P:\Program Files\nodejs\node.exe C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=P:\CSS-Strategy\node_modules\nodegit\build\Release\nodegit.node --module_name=nodegit --module_path=P:\CSS-Strategy\node_modules\nodegit\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp
npm ERR! info it worked if it ends with ok
npm ERR! node-pre-gyp info
npm ERR! using node-pre-gyp#0.13.0
npm ERR! node-pre-gyp info using node#16.17.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "P:\CSS-Strategy\node_modules\nodegit\build\Release\nodegit.node" (not found)
npm ERR! node-pre-gyp
npm ERR! http GET https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp http
npm ERR! 404 https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for nodegit#0.27.0 and node#16.17.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v93-win32-x64.tar.gz
npm ERR! gyp
npm ERR!
npm ERR! info it worked if it ends with ok
npm ERR! gyp
npm ERR! info using node-gyp#9.0.0
npm ERR! gyp
npm ERR! info using node#16.17.0 | win32 | x64
npm ERR! gyp
npm ERR! info ok
npm ERR! gyp
npm ERR! info it worked if it ends with ok
npm ERR! gyp info
npm ERR! using node-gyp#9.0.0
npm ERR! gyp info using node#16.17.0 | win32 | x64
npm ERR! gyp info
npm ERR! find Python using Python version 3.10.7 found at "C:\Users\junu\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR!
npm ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.8.30711.63) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v142
npm ERR! gyp ERR! find VS - missing any Windows SDK
npm ERR! gyp ERR! find VS
npm ERR! could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp
npm ERR! ERR! find VS
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp
npm ERR! ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS
npm ERR! gyp
npm ERR! ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR!
npm ERR! stack at C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR!
npm ERR! stack at C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR!
npm ERR! stack at ChildProcess.exithandler (node:child_process:408:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1093:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "P:\Program Files\nodejs\node.exe" "C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=P:\CSS-Strategy\node_modules\nodegit\build\Release\nodegit.node" "--module_name=nodegit" "--module_path=P:\CSS-Strategy\node_modules\nodegit\build\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd
npm ERR! P:\CSS-Strategy\node_modules\nodegit
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR!
npm ERR! build error
npm ERR! node-pre-gyp
npm ERR! ERR! stack Error: Failed to execute 'P:\Program Files\nodejs\node.exe C:\Users\junu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=P:\CSS-Strategy\node_modules\nodegit\build\Release\nodegit.node --module_name=nodegit --module_path=P:\CSS-Strategy\node_modules\nodegit\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (P:\CSS-Strategy\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR!
npm ERR! stack at maybeClose (node:internal/child_process:1093:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR!
npm ERR! System Windows_NT 10.0.19043
npm ERR! node-pre-gyp ERR! command "P:\Program Files\nodejs\node.exe" "P:\CSS-Strategy\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd P:\CSS-Strategy\node_modules\nodegit
npm ERR! node-pre-gyp ERR! node -v v16.17.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.13.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! [nodegit] ERROR - Could not finish install
npm ERR! [nodegit] ERROR - finished with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\junu\AppData\Local\npm-cache_logs\2022-09-12T15_44_33_340Z-debug-0.log

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

Cypress SSO - cannot install dependencies to run

I am having an issue with cypress SSO.
So I tried to download dependencies by running npm install
I got the following Error (see below).
I'm honestly super confused right as I'm 100% certain I ran the correct command and it seemed be install ok until I got the error. I was going to add the log I don't think it's possible. So my question is :
How do I fix this?
npm ERR! code 1
npm ERR! path /Users/xxx/Documents/Cypress_login-in__single-sign-on/node_modules/deasync
npm ERR! command failed
npm ERR! command sh -c node ./build.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.8.0 | darwin | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python2" can be used
npm ERR! gyp ERR! find Python - "python2" is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:302:47)
npm ERR! gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16)
npm ERR! gyp ERR! stack at exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:416:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:477:16)
npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! gyp ERR! System Darwin 21.4.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/jacquelinegeorge/Documents/Cypress_login-in__single-sign-on/node_modules/deasync
npm ERR! gyp ERR! node -v v16.8.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! Build failed

When I try "npm install --only=prod #hyperledger/caliper-cli#0.4.2", I failed. Why?

I'm trying to install Caliper from NPM with version 7.19.1, following the document from https://hyperledger.github.io/caliper/v0.4.2/installing-caliper/#versioning-semantics
When I run the command
npm install --only=prod #hyperledger/caliper-cli#0.4.2
It turns:
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated #web3-js/scrypt-shim#0.1.0: This package is deprecated, for a pure JS implementation please use scrypt-js
npm WARN deprecated request-promise#4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated multicodec#0.5.7: stable api reached
npm WARN deprecated #web3-js/websocket#1.0.30: The branch for this fork was merged upstream, please update your package to websocket#1.0.31
npm WARN deprecated #hapi/joi#15.1.1: joi is leaving the #hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated ethereumjs-common#1.5.2: New versions are published within new scoped package name format #ethereumjs/common. Please update.
npm WARN deprecated core-js#2.6.12: core-js#<3.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. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /Users/zhuxingyu/vscode/caliper-workspace/node_modules/keccak
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! CXX(target) Release/obj.target/keccak/src/addon.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.4.0 | darwin | x64
npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/local/opt/python#3.9/bin/python3.9"
npm ERR! (node:18836) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/local/opt/python#3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/zhuxingyu/vscode/caliper-workspace/node_modules/keccak/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/zhuxingyu/Library/Caches/node-gyp/16.4.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/zhuxingyu/vscode/caliper-workspace/node_modules/keccak',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR!
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/addon.cc:37:47: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! unsigned int rate = info[0]->IntegerValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3086:40: note: 'IntegerValue' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! ^
npm ERR! ../src/addon.cc:38:51: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! unsigned int capacity = info[1]->IntegerValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3086:40: note: 'IntegerValue' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! ^
npm ERR! ../src/addon.cc:56:48: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! unsigned char bits = info[0]->IntegerValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3086:40: note: 'IntegerValue' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! ^
npm ERR! ../src/addon.cc:64:43: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! size_t length = info[0]->IntegerValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3086:40: note: 'IntegerValue' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! ^
npm ERR! ../src/addon.cc:75:82: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! KeccakWrapper* to = Nan::ObjectWrap::Unwrap<KeccakWrapper>(info[0]->ToObject());
npm ERR! ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3045:44: note: 'ToObject' declared here
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR! ^
npm ERR! 5 errors generated.
npm ERR! make: *** [Release/obj.target/keccak/src/addon.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.5.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/16.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/zhuxingyu/vscode/caliper-workspace/node_modules/keccak
npm ERR! gyp ERR! node -v v16.4.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zhuxingyu/.npm/_logs/2021-07-02T08_03_17_038Z-debug.log
I already tried:
npm update
npm install -g npm
And I think my npm is already up-to-date.
Does anyone ever solve the problem like this? I'm not familiar with the npm tools. Thanks in advance.
Solved: I' m using mirror from Qinghua University and part of it is outdated. So I change my mirror back to official, and it's fixed.
npm config set registry http://www.npmjs.org