Yarn install is failing - npm

I know i shouldn't just throw a question like this and wish i can provide more information, but i am really no idea what it is and it also my first time encounter such issue (after change to new laptop), i think currently i can only provide the error message until someone ask me to provide further info..
When I run the command yarn install at last I am getting below error, tried to install grpc also
error /Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build --library=static_library
Arguments:
Directory: /Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp#0.13.0
node-pre-gyp info using node#18.12.1 | darwin | x64
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp info check checked for "/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc/src/node/extension_binary/node-v108-darwin-x64-unknown/grpc_node.node" (not found)
node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v108-darwin-x64-unknown.tar.gz
node-pre-gyp http 404 https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v108-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v108-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc#1.23.3 and node#18.12.1 (node-v108 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v108-darwin-x64-unknown.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp#9.1.0
gyp info using node#18.12.1 | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp#9.1.0
gyp info using node#18.12.1 | darwin | x64
gyp info find Python using Python version 3.9.6 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
gyp info spawn args \[
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/vishalkumar/Library/Caches/node-gyp/18.12.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/vishalkumar/Library/Caches/node-gyp/18.12.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/vishalkumar/Library/Caches/node-gyp/18.12.1/\<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args \]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp#9.1.0
gyp info using node#18.12.1 | darwin | x64
gyp info spawn make
gyp info spawn args \[ 'BUILDTYPE=Release', '-C', 'build' \]
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
clang: warning: using sysroot for 'iPhoneSimulator' but targeting 'MacOSX' \[-Wincompatible-sysroot\]
In file included from ../deps/grpc/src/core/lib/surface/init.cc:19:
In file included from ../deps/grpc/include/grpc/support/port_platform.h:22:
../deps/grpc/include/grpc/impl/codegen/port_platform.h:201:9: warning: 'GRPC_ARES' macro redefined \[-Wmacro-redefined\]
\#define GRPC_ARES 0
^
\<command line\>:3:9: note: previous definition is here
\#define GRPC_ARES 1
^
In file included from ../deps/grpc/src/core/lib/surface/init.cc:32:
In file included from ../deps/grpc/src/core/lib/channel/handshaker_registry.h:26:
In file included from ../deps/grpc/src/core/lib/channel/handshaker_factory.h:26:
In file included from ../deps/grpc/src/core/lib/channel/handshaker.h:35:
In file included from ../deps/grpc/src/core/lib/iomgr/tcp_server.h:30:
In file included from ../deps/grpc/src/core/lib/iomgr/resolve_address.h:26:
../deps/grpc/src/core/lib/iomgr/port.h:211:2: error: "Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GRPC_CUSTOM_SOCKET"
\#error \
^
1 warning and 1 error generated.
make: \*\*\* \[Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o\] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at ChildProcess.\_handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 22.1.0
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" "--library=static_library" "--module=/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc/src/node/extension_binary/node-v108-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc/src/node/extension_binary/node-v108-darwin-x64-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
gyp ERR! cwd /Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v9.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
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 --library=static_library --module=/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc/src/node/extension_binary/node-v108-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc/src/node/extension_binary/node-v108-darwin-x64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
node-pre-gyp ERR! stack at ChildProcess.\<anonymous\> (/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
node-pre-gyp ERR! stack at ChildProcess.\_handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Darwin 22.1.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc
node-pre-gyp ERR! node -v v18.12.1
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
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 --library=static_library --module=/Users/vishalkumar/Documents/Prudential/one-pulse-app/node_modules/grpc/src/node/extension_binary/node-v108-d
tried yarn install command

You are using Node 18 and you are trying to install the grpc package, which was deprecated two years ago and does not support any version of Node greater than 14. The replacement for that package is #grpc/grpc-js.

Related

Getting yarn install gyp error with #vscode/sqlite3

Computer : MacBook Pro (16-inch, 2019) - Intel I7
OS : Monterey 12.3.1
Python Version : 3.8.0
Node Version : v14.17.6
Node-gyp : v7.1.2
I was able to run yarn install from this project before, but after an update I am having this issue. I have tried:
Deleting node_modules folder and cloning the repo again: Did not work.
Cleaning npm cache : Did not work.
Deleting yarn.lock and package.json.lock files and re-running everything : Did not work.
Deleting the ~/.node-gyp folder : Did not work.
Deleting ~/.npmrc file : Did not work.
[5/5] 🔨 Building fresh packages...
[-/13] ⠐ waiting...
[-/13] ⠐ waiting...
[10/13] ⠐ #vscode/sqlite3
[11/13] ⠐ nodegit
error /Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#vscode/sqlite3: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#vscode/sqlite3
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp#7.1.2
gyp info using node#14.17.6 | darwin | x64
gyp info find Python using Python version 3.8.0 found at "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3"
gyp info spawn /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
gyp info spawn args [
gyp info spawn args '/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#vscode/sqlite3/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/matspeda/Library/Caches/node-gyp/14.17.6/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/matspeda/Library/Caches/node-gyp/14.17.6',
gyp info spawn args '-Dnode_gyp_dir=/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#npmcli/run-script/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/matspeda/Library/Caches/node-gyp/14.17.6/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#vscode/sqlite3',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CC(target) Release/obj.target/nothing/../../node-addon-api/nothing.o
LIBTOOL-STATIC Release/nothing.a
env: python: No such file or directory
make: *** [Release/nothing.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#npmcli/run-script/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/Users/matspeda/.nvm/versions/node/v14.17.6/bin/node" "/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#vscode/sqlite3
gyp ERR! node -v v14.17.6
warning Error running install script for optional dependency: "/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/cpu-features: Command failed.
Exit code: 1
Command: node buildcheck.js > buildcheck.gypi && node-gyp rebuild
Arguments:
Directory: /Users/matspeda/Documents/GitHub/hm-backstage/node_modules/cpu-features
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp#7.1.2
gyp info using node#14.17.6 | darwin | x64
gyp info find Python using Python version 3.8.0 found at \"/Library/Frameworks/Python.framework/Versions/3.8/bin/python3\"
gyp info spawn /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
gyp info spawn args [
gyp info spawn args '/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/cpu-features/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/matspeda/Library/Caches/node-gyp/14.17.6/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/matspeda/Library/Caches/node-gyp/14.17.6',
gyp info spawn args '-Dnode_gyp_dir=/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#npmcli/run-script/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/matspeda/Library/Caches/node-gyp/14.17.6/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/cpu-features',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o
LIBTOOL-STATIC Release/cpu_features.a
env: python: No such file or directory
make: *** [Release/cpu_features.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/#npmcli/run-script/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command \"/Users/matspeda/.nvm/versions/node/v14.17.6/bin/node\" \"/Users/matspeda/Documents/GitHub/hm-backstage/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/matspeda/Documents/GitHub/hm-backstage/node_modules/cpu-features
gyp ERR! node -v v14.17.6
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok"
info This module is OPTIONAL, you can safely ignore this error
In case anyone stumbles with same/similar issue. There was one folder I did not see mentioned online to remove which I ended up removing , then restarting the system which finnally fixed my problem.
Delete the following folder. You can use Finder > Go to folder > Replace with your user below :
/Users/username/Library/Caches/node-gyp

Errors while installing react native packages using yarn

Can someone help me with these errors while installing the packages using yarn.
I am using react native in the frontend and Django in the backend and for the database Postgres. I am running on WSL2 too and using node v16.13.1.
What can be the problem causing all of these errors?
Here are the errors in WSL
Error running install script for optional dependency: "/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp#0.11.0
node-pre-gyp info using node#16.13.1 | linux | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for \"/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node\" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-x64.tar.gz
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-x64.tar.gz
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3#4.2.0 and node#16.13.1 (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp#5.1.1
gyp info using node#16.13.1 | linux | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp#5.1.1
gyp info using node#16.13.1 | linux | x64
gyp info find Python using Python version 3.8.10 found at \"/usr/bin/python3\"
(node:25437) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/mnt/e/myProjects/LastVersion/Project/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/mnt/e/myProjects/LastVersion/Project/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/user/.cache/node-gyp/16.13.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/user/.cache/node-gyp/16.13.1',
gyp info spawn args '-Dnode_gyp_dir=/mnt/e/myProjects/LastVersion/Project/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/user/.cache/node-gyp/16.13.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp#5.1.1
gyp info using node#16.13.1 | linux | x64
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/mnt/e/myProjects/LastVersion/Project/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/mnt/e/myProjects/LastVersion/Project/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/mnt/e/myProjects/LastVersion/Project/node_modules/which/which.js:80:29)
gyp ERR! stack at /mnt/e/myProjects/LastVersion/Project/node_modules/which/which.js:89:16
gyp ERR! stack at /mnt/e/myProjects/LastVersion/Project/node_modules/isexe/index.js:42:5
gyp ERR! stack at /mnt/e/myProjects/LastVersion/Project/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
gyp ERR! command \"/home/user/.nvm/versions/node/v16.13.1/bin/node\" \"/mnt/e/myProjects/LastVersion/Project/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node\" \"--module_name=node_sqlite3\" \"--module_path=/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3/lib/binding/node-v93-linux-x64\" \"--napi_version=8\" \"--node_abi_napi=napi\" \"--napi_build_version=0\" \"--node_napi_label=node-v93\"
gyp ERR! cwd /mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3
gyp ERR! node -v v16.13.1
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/user/.nvm/versions/node/v16.13.1/bin/node /mnt/e/myProjects/LastVersion/Project/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3/lib/binding/node-v93-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/mnt/e/myProjects/LastVersion/Project/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
node-pre-gyp ERR! command \"/home/user/.nvm/versions/node/v16.13.1/bin/node\" \"/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3
node-pre-gyp ERR! node -v v16.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/home/user/.nvm/versions/node/v16.13.1/bin/node /mnt/e/myProjects/LastVersion/Project/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/mnt/e/myProjects/LastVersion/Project/node_modules/sqlite3/

yarn failing from a node-gyp bug

I am trying to run yarn --ignore-engines on my project. I am getting this error message:
error C:\Users\Jerome\mono\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: C:\Users\Jerome\mono\node_modules\node-sass
Output:
Building: C:\Program Files (x86)\nodejs\node.exe C:\Users\Jerome\mono\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Program Files (x86)\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp#3.8.0
gyp info using node#16.2.0 | win32 | ia32
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Users\Jerome\.windows-build-tools\python27\python.exe" in the PATH
gyp verb `which` succeeded C:\Users\Jerome\.windows-build-tools\python27\python.exe C:\Users\Jerome\.windows-build-tools\python27\python.exe
gyp verb check python version `C:\Users\Jerome\.windows-build-tools\python27\python.exe -c "import sys; print "2.7.15
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 16.2.0
gyp verb command install [ '16.2.0' ]
gyp verb install input version string "16.2.0"
gyp verb install installing version: 16.2.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 16.2.0
gyp verb build dir attempting to create "build" dir: C:\Users\Jerome\mono\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? C:\Users\Jerome\mono\node_modules\node-sass\build
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.19041
gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
gyp verb find vs2017 - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017 - Using this installation with Windows 10 SDK
gyp verb find vs2017 using installation: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\Jerome\mono\node_modules\node-sass\build\config.gypi
(node:12932) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp verb config.gypi checking for gypi file: C:\Users\Jerome\mono\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\Jerome\mono\node_modules\node-sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Users\Jerome\.windows-build-tools\python27\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=2015',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Jerome\\.node-gyp\\16.2.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\Jerome\\.node-gyp\\16.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\Jerome\\.node-gyp\\16.2.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Jerome\\mono\\node_modules\\node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture ia32
gyp verb node dev dir C:\Users\Jerome\.node-gyp\16.2.0
gyp verb found first Solution file build/binding.sln
gyp verb using MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=Win32'
gyp info spawn args ]
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
gyp ERR! stack at onErrorNT (node:internal/child_process:480:16)
gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Jerome\mono\node_modules\node-sass
gyp ERR! node -v v16.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in `node-gyp`.
From some other SO posts I believe the cause of this is because I have not installed windows-build-tools properly. Although when I try to run npm i -g windows-build-tools it idles for over an hour and never executes.
C:\Users\Jerome\mono>npm install --global windows-build-tools
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, see https://github.com/request/request/issues/3142
[ ] - reify:resolve: timing reifyNode:node_modules/windows-build-tools/node_modules/ajv Completed in 357ms
Turns out we had two versions of Visual Studio Build Tools installed: 2017 and 2019. Steps to fix were:
Windows key
Add or remove programs
Scroll down to Visual Studio Build Tools 2019
Uninstall
This is due to nod-sass incompatibility.
It is better to install the sass instead of node-sass.
To solve this problem, follow the steps below in order:
delete node-sass from the package.json
run npm install or yarn
npm install sass

Error when downloading expo with yarn - is there a problem with yarn or expo?

I am trying to setup my environment to start working on react-native but yarn doesn't seem to properly install expo-cli.
I tried installing with npm, but apparently npm is buggy today (i'm am in a class and all who work on IOS had problems installing with npm). now that we are using yarn, it has worked for everyone but me.
error /Users/nicolaspage/toto/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /Users/nicolaspage/toto/node_modules/sharp
Output:
info sharp Using cached /Users/nicolaspage/.npm/_libvips/libvips-8.7.4-darwin-x64.tar.gz
ERR! sharp Please delete /Users/nicolaspage/.npm/_libvips/libvips-8.7.4-darwin-x64.tar.gz as it is not a valid tarball
ERR! sharp zlib: unexpected end of file
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/page/install for required dependencies
gyp info it worked if it ends with ok
gyp info using node-gyp#3.8.0
gyp info using node#11.10.1 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/node/11.10.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/nicolaspage/toto/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/11.10.1/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/nicolaspage/.node-gyp/11.10.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/nicolaspage/.node-gyp/11.10.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/11.10.1/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/nicolaspage/.node-gyp/11.10.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/nicolaspage/toto/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:25:10: fatal error: 'vips/vips8' file not found
#include <vips/vips8>
^~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/11.10.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/Cellar/node/11.10.1/bin/node" "/usr/local/Cellar/node/11.10.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/nicolaspage/toto/node_modules/sharp
gyp ERR! node -v v11.10.1
i found this answer on medium and it worked for me... the error is ususally caused by libvips8.7.4 from the github repo
https://medium.com/#zameermfm/handling-libvip-sharp-errors-in-react-native-expo-installation-8eb592b6314b

Setting up hubot on an openfire server

I'm running Ubuntu and I am trying to get a hubot to connect to my local openfire server. I followed the tutorial here, and everything went pretty smooth till toward the end, after editing the dependencies, I run npm install and receive two warnings:
npm WARN package.json node-xmpp#0.3.2 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
> node-stringprep#0.1.11 install /opt/hubot/my-bot/node_modules/node-stringprep
> node-gyp rebuild
I'm not sure what it means that the repositories arn't supported and I tried npm install node-stringprep and a node-gyp rebuild. The npm install gives me the same warnings, but finishes succesfully, while the rebuild gives me this error output:
gyp info it worked if it ends with ok
gyp info using node-gyp#0.12.1
gyp info using node#0.10.23 | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/opt/hubot/my-bot/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/jake/.node-gyp/0.10.23/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/jake/.node-gyp/0.10.23',
gyp info spawn args '-Dmodule_root_dir=/opt/hubot/my-bot',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /opt/hubot/my-bot)
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.8.0-34-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/hubot/my-bot
gyp ERR! node -v v0.10.23
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
Since they are warnings and not errors(on the npm install), I went ahead and started hubot to see if it would connect but it doesn't. I don't get any errors from it but it doesn't connect. The output when I run the bot:
jake#jake-Lenovo-G580:/opt/hubot/my-bot$ ./bin/hubot --adapter xmpp
npm WARN package.json node-xmpp#0.3.2 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
> node-stringprep#0.1.11 install /opt/hubot/my-bot/node_modules/node-stringprep
> node-gyp rebuild
make: Entering directory `/opt/hubot/my-bot/node_modules/node-stringprep/build'
CXX(target) Release/obj.target/node_stringprep/node-stringprep.o
SOLINK_MODULE(target) Release/obj.target/node_stringprep.node
SOLINK_MODULE(target) Release/obj.target/node_stringprep.node: Finished
COPY Release/node_stringprep.node
make: Leaving directory `/opt/hubot/my-bot/node_modules/node-stringprep/build'
[Mon Dec 30 2013 13:39:23 GMT-0700 (MST)] INFO { username: 'hubot',
password: 'asdf',
host: '127.0.0.1',
port: '9090',
rooms: [ { jid: 'hubot-test', password: false } ],
keepaliveInterval: 30000 }
And nothing happens.
I double checked all the hubot xmpp fields several times to make sure they are correct, and although this particular output does not have it, I tried several variations of usernames -> hubot#jake-lenovo-g580 and hubot#jake-Lenovo-G580, so that it matches my domain.
Any help much appreciated.