How to fix npm ERR! code 1 in a Laravel Project - laravel

I recently started to learn Laravel and today I run into an error when setting up my Laravel project (using windows). I tried to find a suitable solution online but none of them works.
Commands:
composer create-project laravel/laravel quickstart-v2 --prefer-dist "5.2.*"
composer update
npm install
Node -V: v12.14.1
npm -V: 7.20.3
Error after running "npm install":
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 WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated request#2.88.2: request has been deprecated,
npm ERR! code 1
npm ERR! path C:\xampp\htdocs\laravel-project\quickstart-v2\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:\xampp\htdocs\laravel-project\quickstart-v2\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:\\xampp\\htdocs\\laravel-project\\quickstart-v2\\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#12.14.1 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "D:\Library\Python\Python27\python.exe" in the PATH
npm ERR! gyp verb `which` failed Error: not found: D:\Library\Python\Python27\python.exe
npm ERR! gyp verb `which` failed at getNotFoundError (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:158:21)
npm ERR! gyp verb `which` failed D:\Library\Python\Python27\python.exe Error: not found: D:\Library\Python\Python27\python.exe
npm ERR! gyp verb `which` failed at getNotFoundError (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:158:21) {
npm ERR! gyp verb `which` failed stack: 'Error: not found: D:\\Library\\Python\\Python27\\python.exe\n' +
npm ERR! gyp verb `which` failed ' at getNotFoundError (C:\\xampp\\htdocs\\laravel-project\\quickstart-v2\\node_modules\\which\\which.js:13:12)\n' +
npm ERR! gyp verb `which` failed ' at F (C:\\xampp\\htdocs\\laravel-project\\quickstart-v2\\node_modules\\which\\which.js:68:19)\n' +
npm ERR! gyp verb `which` failed ' at E (C:\\xampp\\htdocs\\laravel-project\\quickstart-v2\\node_modules\\which\\which.js:80:29)\n' +
npm ERR! gyp verb `which` failed ' at C:\\xampp\\htdocs\\laravel-project\\quickstart-v2\\node_modules\\which\\which.js:89:16\n' +
npm ERR! gyp verb `which` failed ' at C:\\xampp\\htdocs\\laravel-project\\quickstart-v2\\node_modules\\isexe\\index.js:42:5\n' +
npm ERR! gyp verb `which` failed ' at C:\\xampp\\htdocs\\laravel-project\\quickstart-v2\\node_modules\\isexe\\windows.js:36:5\n' +
npm ERR! gyp verb `which` failed ' at FSReqCallback.oncomplete (fs.js:158:21)',
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "D:\Library\Python\Python27\python.exe". checking python launcher
npm ERR! gyp verb could not find "D:\Library\Python\Python27\python.exe". 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 "D:\Library\Python\Python27\python.exe", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\node-gyp\node_modules\graceful-fs\polyfills.js:299:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (fs.js:158:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\xampp\\htdocs\\laravel-project\\quickstart-v2\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\xampp\htdocs\laravel-project\quickstart-v2\node_modules\node-sass
npm ERR! gyp ERR! node -v v12.14.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
Any suggestions on how to fix it or how to interpret the error?
Thank you in advance!
Cheers!

Related

Getting dependency errors upon expo-update on mac for ios-build, unable to install node-modules

npm ERR! path /Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
npm ERR! Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93’ (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.11.0
npm ERR! node-pre-gyp info using node#16.14.2 | darwin | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for “/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node” (not found)
npm ERR! node-pre-gyp WARN Tried to download(403):
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3#4.2.0 and node#16.14.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | x64
npm ERR! gyp info find Python using Python version 3.8.9 found at “/Applications/Xcode.app/Contents/Developer/usr/bin/python3”
npm ERR! gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
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/admin/Documents/New/my-app/frontend/node_modules/sqlite3/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/admin/Library/Caches/node-gyp/16.14.2/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/admin/Library/Caches/node-gyp/16.14.2’,
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/admin/Library/Caches/node-gyp/16.14.2/<(target_arch)/node.lib’,
npm ERR! gyp info spawn args ‘-Dmodule_root_dir=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3’,
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! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
npm ERR! /bin/sh: python: command not found
npm ERR! make: *** [Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
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:526:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–module=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node” “–module_name=node_sqlite3” “–module_path=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64” “–napi_version=8” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v93”
npm ERR! gyp ERR! cwd /Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64 --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. (/Users/admin/Documents/New/my-app/frontend/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092: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! System Darwin 21.5.0
npm ERR! node-pre-gyp ERR! command “/usr/local/bin/node” “/Users/admin/Documents/New/my-app/frontend/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build”
npm ERR! node-pre-gyp ERR! cwd /Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.14.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/admin/.npm/_logs/2022-05-31T05_31_43_462Z-debug-0.lo
I’m using the node -:16.15.0, expo-cli -:5.3.1, and expo-:41 versions and I’m getting above error whenever I’m running “npm install” command.

how can I solve this error when I want to install gulp-sass on mac with npm

npm ERR! code 1
npm ERR! path /Users/aliabniki/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/Cellar/node/15.3.0/bin/node /Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/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 '/usr/local/Cellar/node/15.3.0/bin/node',
npm ERR! gyp verb cli '/Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/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.3.0 | darwin | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` succeeded python2 /usr/bin/python2
npm ERR! gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.16
npm ERR! gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 15.3.0
npm ERR! gyp verb command install [ '15.3.0' ]
npm ERR! gyp verb install input version string "15.3.0"
npm ERR! gyp verb install installing version: 15.3.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 15.3.0
npm ERR! gyp verb build dir attempting to create "build" dir: /Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/node_modules/node-sass/build
npm ERR! gyp verb build dir "build" dir needed to be created? /Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/node_modules/node-sass/build
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: /Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/node_modules/node-sass/build/config.gypi
npm ERR! gyp verb config.gypi checking for gypi file: /Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/node_modules/node-sass/config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: /Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/node_modules/node-sass/common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/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/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/node_modules/node-sass/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gulp- sass/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/aaa/.node-gyp/15.3.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/aliabniki/.node-gyp/15.3.0',
npm ERR! gyp info spawn args '- Dnode_gyp_dir=/Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules/gu lp-sass/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/aliabniki/.node- gyp/15.3.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '- Dmodule_root_dir=/Users/aaa/Sites/projects/PracticeProjects/MiniProjects/test/node_modules /gulp-sass/node_modules/node-sass',
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: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit
this error occures when I want to install gulp-sass with npm package
sudo npm install gulp-sass --save-dev
node-sass installation has no problem but gulp-sass can not be installed
please help me to solve this problem
I have installed sass with npm and other packages like "browser-sync" or "gulp-cli" installed correctly but "gulp-sass" have not been installed anyway!
I had the same issue when attempting to install gulp-sass and node-sass onto a Mac Mini M1 with macOS 11.3. The solution suggested 'sudo xcode-select --reset' resolved the problem and allowed me to get the needed packages installed.
Thanks,

How to fix: gyp ERR! stack Error: Can't find Python executable "python"'

I've removed node modules and reinstall it but not solving the problem. If I run yarn add node-sass, the following error comes up in my terminal
gyp verb `which` failed at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed stack:
gyp verb `which` failed 'Error: not found: python\n at getNotFoundError (C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\which\\which.js:13:12)\n at F (C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\which\\which.js:68:19)\n at E (C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\which\\which.js:80:29)\n at C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\which\\which.js:89:16\n at C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\isexe\\index.js:42:5\n at C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at callback (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\graceful-fs\polyfills.js:295:20)
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\node-sass
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
node and npm version are
node- v 10.16.0
npm -v 6.9.0
Follow the step:
npm install -g node-gyp
npm install --global --production windows-build-tools
this is the new error i got from running the last command you gave me
Error: spawnSync powershell.exe ENOENT
at Object.spawnSync (internal/child_process.js:1002:20)
at Object.spawnSync (child_process.js:614:24)
at spawnSync (C:\Users\AKA\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:67:36)
at Object.queryRegFromPowershell (C:\Users\AKA\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:73:3)
at loop (C:\Users\AKA\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:113:16)
at opts.shift (C:\Users\AKA\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:116:7)
at spawn (C:\Users\AKA\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:100:5)
at spawnSync (C:\Users\AKA\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:68:2)
at Object.queryRegFromRegExe (C:\Users\AKA\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:96:3)
at loop (C:\Users\AKA\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:113:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! windows-build-tools#4.0.0 postinstall: `node ./dist/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the windows-build-tools#4.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Can't install web3 on macos

I'm having difficulties installing web3 on my mac. I've tried a number of fixes but I get the same error every time.
I tried installing sha3 separately and made sure that I had Xtools installed.
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/craiglou/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:389:11)
gyp ERR! stack at Socket.emit (events.js:189:13)
gyp ERR! stack at Pipe._handle.close (net.js:597:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/craiglou/Desktop/inbox/node_modules/keccakjs/node_modules/sha3
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN webpack-cli#2.1.5 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN inbox#1.0.0 No description
npm WARN inbox#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sha3#1.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sha3#1.2.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/craiglou/.npm/_logs/2019-08-19T23_31_04_618Z-debug.log

Yeoman Meanjs generator unable to get local issuer certificate

The company I work for uses a Zscaler proxy and I am trying to get the meanjs yeoman generator to work on my Windows 10 machine. So far I have managed to get npm to work by setting the proxy, https-proxy and the registry as follows:
npm config set proxy http://gateway.zscalerone.net/80
npm config set https-proxy http://gateway.zscalerone.net/80
npm config set registry http://registry.npmjs.org/
however when I run:
yo meanjs
I get the following:
Running npm install for you....
This may take a couple minutes.
Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "cd mean && npm install"
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated graceful-fs#2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs#3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated minimatch#1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global node-gyp#3.3.1 should be installed with -g
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1017:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:582:8)
gyp ERR! stack at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:424:38)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ShaneH\\AppData\\Roaming\\nvm\\v4.4.5\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ShaneH\Code\temp\mean\node_modules\bufferutil
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:bufferutil#1.2.1 bufferutil#1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil#1.2.1 Exit status 1
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1017:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:582:8)
gyp ERR! stack at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:424:38)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ShaneH\\AppData\\Roaming\\nvm\\v4.4.5\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ShaneH\Code\temp\mean\node_modules\utf-8-validate
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:utf-8-validate#1.2.1 utf-8-validate#1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate#1.2.1 Exit status 1
node-pre-gyp ERR! Tried to download: https://node-inspector.s3.amazonaws.com/debug/v0.7.7/node-v46-win32-ia32.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug#0.7.7 and node#4.4.5 (node-v46 ABI) (falling back to source compile with node-gyp)
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1017:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:582:8)
gyp ERR! stack at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:424:38)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ShaneH\\Code\\temp\\mean\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\ShaneH\\Code\\temp\\mean\\node_modules\\v8-debug\\build\\debug\\v0.7.7\\node-v46-win32-ia32\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\ShaneH\\Code\\temp\\mean\\node_modules\\v8-debug\\build\\debug\\v0.7.7\\node-v46-win32-ia32" "--msvs_version=2015"
gyp ERR! cwd C:\Users\ShaneH\Code\temp\mean\node_modules\v8-debug
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\ShaneH\Code\temp\mean\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\ShaneH\Code\temp\mean\node_modules\v8-debug\build\debug\v0.7.7\node-v46-win32-ia32\debug.node --module_name=debug --module_path=C:\Users\ShaneH\Code\temp\mean\node_modules\v8-debug\build\debug\v0.7.7\node-v46-win32-ia32 --msvs_version=2015' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ShaneH\Code\temp\mean\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:827:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 10.0.10240
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ShaneH\\Code\\temp\\mean\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\ShaneH\Code\temp\mean\node_modules\v8-debug
node-pre-gyp ERR! node -v v4.4.5
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
node-pre-gyp ERR! not ok
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.12
npm WARN eslint-config-airbnb#6.0.2 requires a peer of eslint-plugin-react#^4.0.0 but none was installed.
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.5
npm ERR! npm v3.9.6
npm ERR! code ELIFECYCLE
npm ERR! v8-debug#0.7.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug#0.7.7 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the v8-debug package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs v8-debug
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls v8-debug
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\ShaneH\Code\temp\mean\npm-debug.log
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Which seems to indicate that it can't connect via https to
https://node-inspector.s3.amazonaws.com/debug/v0.7.7/node-v46-win32-ia32.tar.gz
I have tried setting up http_proxy and https_proxy environment variables, but this doesn't seem to have made a difference. I am also able to browse to that URL in a browser without an issue.
I assume the error has to do with the way Zscaler is handling https. Any help would be greatly appreciated.

Resources