Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
422 stars 126 forks source link

[Bug]: Latest CLI version breaks `shopify theme dev` command #3662

Closed bansavage closed 6 months ago

bansavage commented 6 months ago

Please confirm that you have:

In which of these areas are you experiencing a problem?

Theme

Expected behavior

shopify theme dev should work as expected and start the local server. I updated my CLI to the latest version using homebrew commands brew upgrade && brew update. Following this shopify theme dev errors out.

Actual behavior

shopify theme dev errors out after upgrading to latest version. The only fix is to run SHOPIFY_CLI_BUNDLED_THEME_CLI=1 shopify theme dev

The errors is related to Ruby bundling, and the error log states:

Error coming from `/opt/homebrew/opt/ruby/bin/bundle install`

Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

Verbose output

── external error ──────────────────────────────────────────────────────────────────────────────────────────

Error coming from `/opt/homebrew/opt/ruby/bin/bundle install`

Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ext/nokogiri
/opt/homebrew/opt/ruby/bin/ruby extconf.rb
checking for whether -std=c99 is accepted as CFLAGS... yes
checking for whether -Wno-declaration-after-statement is accepted as CFLAGS...
yes
checking for whether -O2 is accepted as CFLAGS... yes
checking for whether -g is accepted as CFLAGS... yes
checking for whether -Winline is accepted as CFLAGS... yes
checking for whether -Wmissing-noreturn is accepted as CFLAGS... yes
checking for whether -Wshorten-64-to-32 is accepted as CFLAGS... yes
checking for whether
-Wno-error=unused-command-line-argument-hard-error-in-future is accepted as
CFLAGS... no
checking for whether -Wno-unknown-warning-option is accepted as CFLAGS... yes
Building nokogiri using packaged libraries.
Static linking is enabled.
Cross build is disabled.
checking for iconv.h... yes
Using mini_portile version 2.8.5
checking for iconv using --with-opt-* flags... yes
---------- IMPORTANT NOTICE ----------
Building Nokogiri with a packaged version of libxml2-2.10.4.
Configuration options: --host\=arm64-apple-darwin23 --enable-static
--disable-shared
--libdir\=/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxml2/2.10.4/lib
--with-iconv\=yes --disable-dependency-tracking --without-python
--without-readline --with-c14n --with-debug --with-threads --disable-shared
--enable-static CPPFLAGS\=-I/opt/homebrew/opt/libyaml/include\
-I/opt/homebrew/opt/openssl@3/include LDFLAGS\=-L/opt/homebrew/opt/libyaml/lib\
-L/opt/homebrew/opt/openssl@3/lib RANLIB\=/usr/bin/ranlib AR\=/usr/bin/ar
CFLAGS\=-O2\ -U_FORTIFY_SOURCE\ -g\ -fPIC
The following patches are being applied:
  - 0001-Remove-script-macro-support.patch
  - 0002-Update-entities-to-remove-handling-of-ssi.patch
  - 0003-libxml2.la-is-in-top_builddir.patch
  - 0009-allow-wildcard-namespaces.patch

The Nokogiri maintainers intend to provide timely security updates, but if
this is a concern for you and want to use your OS/distro system library
instead, then abort this installation process and install nokogiri as
instructed at:

https://nokogiri.org/tutorials/installing_nokogiri.html#installing-using-standard-system-libraries

Note, however, that nokogiri cannot guarantee compatibility with every
version of libxml2 that may be provided by OS/package vendors.

Extracting libxml2-2.10.4.tar.xz into
tmp/arm64-apple-darwin23/ports/libxml2/2.10.4... OK
Running git apply with
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/patches/libxml2/0001-Remove-script-macro-support.patch...
OK
Running git apply with
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/patches/libxml2/0002-Update-entities-to-remove-handling-of-ssi.patch...
OK
Running git apply with
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch...
OK
Running git apply with
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/patches/libxml2/0009-allow-wildcard-namespaces.patch...
OK
Running 'configure' for libxml2 2.10.4... OK
Running 'compile' for libxml2 2.10.4... OK
Running 'install' for libxml2 2.10.4... OK
Activating libxml2 2.10.4 (from
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxml2/2.10.4)...
Using mini_portile version 2.8.5
---------- IMPORTANT NOTICE ----------
Building Nokogiri with a packaged version of libxslt-1.1.37.
Configuration options: --host\=arm64-apple-darwin23 --enable-static
--disable-shared
--libdir\=/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxslt/1.1.37/lib
--disable-dependency-tracking --without-python --without-crypto --with-debug
--with-libxml-prefix\=/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxml2/2.10.4
--disable-shared --enable-static RANLIB\=/usr/bin/ranlib AR\=/usr/bin/ar
CFLAGS\=-O2\ -U_FORTIFY_SOURCE\ -g\ -fPIC
The following patches are being applied:
  - 0001-update-automake-files-for-arm64.patch

The Nokogiri maintainers intend to provide timely security updates, but if
this is a concern for you and want to use your OS/distro system library
instead, then abort this installation process and install nokogiri as
instructed at:

https://nokogiri.org/tutorials/installing_nokogiri.html#installing-using-standard-system-libraries

Extracting libxslt-1.1.37.tar.xz into
tmp/arm64-apple-darwin23/ports/libxslt/1.1.37... OK
Running git apply with
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/patches/libxslt/0001-update-automake-files-for-arm64.patch...
OK
Running 'configure' for libxslt 1.1.37... ERROR. Please review logs to see what
happened:
----- contents of
'/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ext/nokogiri/tmp/arm64-apple-darwin23/ports/libxslt/1.1.37/configure.log'
-----
configure: error: cannot run /bin/sh ./config.sub
----- end of file -----
----- contents of 'config.log' -----
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libxslt configure 1.1.37, which was
generated by GNU Autoconf 2.71.  Invocation command line was

$ ./configure --host=arm64-apple-darwin23 --enable-static --disable-shared
--libdir=/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxslt/1.1.37/lib
--disable-dependency-tracking --without-python --without-crypto --with-debug
--with-libxml-prefix=/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxml2/2.10.4
--disable-shared --enable-static RANLIB=/usr/bin/ranlib AR=/usr/bin/ar
'CFLAGS=-O2 -U_FORTIFY_SOURCE -g -fPIC'
--prefix=/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxslt/1.1.37

## --------- ##
## Platform. ##
## --------- ##

hostname = Salsa-Verde.local
uname -m = arm64
uname -r = 23.4.0
uname -s = Darwin
uname -v = Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024;
root:xnu-10063.101.17~1/RELEASE_ARM64_T8103

/usr/bin/uname -p = arm
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024;
root:xnu-10063.101.17~1/RELEASE_ARM64_T8103
Kernel configured for up to 8 processors.
8 processors are physically available.
8 processors are logically available.
Processor type: arm64e (ARM64E)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 496 tasks, 4074 threads, 8 processors
Load average: 3.02, Mach factor: 4.97
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH:
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxml2/2.10.4/bin/
PATH: /opt/homebrew/lib/ruby/gems/3.3.0/bin/
PATH: /opt/homebrew/opt/ruby/bin/
PATH: /Users/bansavage/.nvm/versions/node/v14.17.0/bin/
PATH: /opt/homebrew/bin/
PATH: /usr/local/bin/
PATH: /usr/local/sbin/
PATH: /opt/homebrew/bin/
PATH: /opt/homebrew/sbin/
PATH: /usr/local/bin/
PATH: /System/Cryptexes/App/usr/bin/
PATH: /usr/bin/
PATH: /bin/
PATH: /usr/sbin/
PATH: /sbin/
PATH: /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin/
PATH: /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin/
PATH:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin/
PATH: /Library/Apple/usr/bin/
PATH: /Users/bansavage/.nvm/versions/node/v14.17.0/bin/
PATH: /opt/homebrew/bin/
PATH: /opt/homebrew/sbin/

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2523: looking for aux files: ltmain.sh missing install-sh compile
config.guess config.sub
configure:2536:  trying ./
configure:2565:   ./ltmain.sh found
configure:2565:   ./missing found
configure:2547:   ./install-sh found
configure:2565:   ./compile found
configure:2565:   ./config.guess found
configure:2565:   ./config.sub found
configure:2685: error: cannot run /bin/sh ./config.sub

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=set
ac_cv_env_CC_value=clang
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O2 -U_FORTIFY_SOURCE -g -fPIC'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-L/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxml2/2.10.4/lib
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LIBXML_CFLAGS_set=
ac_cv_env_LIBXML_CFLAGS_value=
ac_cv_env_LIBXML_LIBS_set=
ac_cv_env_LIBXML_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_PYTHON_CFLAGS_set=
ac_cv_env_PYTHON_CFLAGS_value=
ac_cv_env_PYTHON_LIBS_set=
ac_cv_env_PYTHON_LIBS_value=
ac_cv_env_PYTHON_set=
ac_cv_env_PYTHON_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=arm64-apple-darwin23
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AM_BACKSLASH=''
AM_DEFAULT_V=''
AM_DEFAULT_VERBOSITY=''
AM_V=''
AR='/usr/bin/ar'
AS=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
CC='clang'
CCDEPMODE=''
CFLAGS='-O2 -U_FORTIFY_SOURCE -g -fPIC'
CPP=''
CPPFLAGS=''
CRYPTO_TESTDIR=''
CSCOPE=''
CTAGS=''
CYGPATH_W=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
ETAGS=''
EXEEXT=''
EXSLT_INCLUDEDIR=''
EXSLT_LIBDIR=''
EXSLT_PRIVATE_LIBS=''
EXTRA_LIBS=''
FGREP=''
GREP=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
LD=''
LDFLAGS='-L/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxml2/2.10.4/lib'
LIBEXSLT_MAJOR_VERSION=''
LIBEXSLT_MICRO_VERSION=''
LIBEXSLT_MINOR_VERSION=''
LIBEXSLT_VERSION=''
LIBEXSLT_VERSION_EXTRA=''
LIBEXSLT_VERSION_INFO=''
LIBEXSLT_VERSION_NUMBER=''
LIBGCRYPT_CFLAGS=''
LIBGCRYPT_CONFIG=''
LIBGCRYPT_LIBS=''
LIBM=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIBXML_CFLAGS=''
LIBXML_LIBS=''
LIBXML_REQUIRED_VERSION=''
LIBXML_SRC=''
LIBXSLT_CFLAGS=''
LIBXSLT_DEFAULT_PLUGINS_PATH=''
LIBXSLT_MAJOR_MINOR_VERSION=''
LIBXSLT_MAJOR_VERSION=''
LIBXSLT_MICRO_VERSION=''
LIBXSLT_MINOR_VERSION=''
LIBXSLT_VERSION=''
LIBXSLT_VERSION_EXTRA=''
LIBXSLT_VERSION_INFO=''
LIBXSLT_VERSION_NUMBER=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO=''
MANIFEST_TOOL=''
MKDIR_P=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='libxslt'
PACKAGE_STRING='libxslt 1.1.37'
PACKAGE_TARNAME='libxslt'
PACKAGE_URL=''
PACKAGE_VERSION='1.1.37'
PATH_SEPARATOR=':'
PERL=''
PKG_CONFIG=''
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
PYTHON=''
PYTHON_CFLAGS=''
PYTHON_EXEC_PREFIX=''
PYTHON_LIBS=''
PYTHON_PLATFORM=''
PYTHON_PREFIX=''
PYTHON_VERSION=''
RANLIB='/usr/bin/ranlib'
RELDATE=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
THREAD_LIBS=''
USE_VERSION_SCRIPT_FALSE=''
USE_VERSION_SCRIPT_TRUE=''
VERSION=''
VERSION_SCRIPT_FLAGS=''
WITH_CRYPTO=''
WITH_DEBUGGER=''
WITH_MEM_DEBUG=''
WITH_MODULES=''
WITH_MODULES_FALSE=''
WITH_MODULES_TRUE=''
WITH_PERL_FALSE=''
WITH_PERL_TRUE=''
WITH_PROFILER=''
WITH_PYTHON_FALSE=''
WITH_PYTHON_TRUE=''
WITH_THREADS=''
WITH_TRIO=''
WITH_XSLT_DEBUG=''
XMLLINT=''
XML_CONFIG=''
XSLTPROC=''
XSLT_INCLUDEDIR=''
XSLT_LIBDIR=''
XSLT_LIBS=''
XSLT_PRIVATE_LIBS=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot=''
am__nodep=''
am__quote=''
am__tar=''
am__untar=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='arm64-apple-darwin23'
host_alias='arm64-apple-darwin23'
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh=''
libdir='/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxslt/1.1.37/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
pkgpyexecdir=''
pkgpythondir=''
prefix='/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ports/arm64-darwin23/libxslt/1.1.37'
program_transform_name='s,x,x,'
psdir='${docdir}'
pyexecdir=''
pythondir=''
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "libxslt"
#define PACKAGE_TARNAME "libxslt"
#define PACKAGE_VERSION "1.1.37"
#define PACKAGE_STRING "libxslt 1.1.37"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 2
----- end of file -----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --with-opt-include=${opt-dir}/include
        --without-opt-include
        --with-opt-lib=${opt-dir}/lib
        --without-opt-lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/opt/homebrew/Cellar/ruby/3.3.0/bin/$(RUBY_BASE_NAME)
        --help
        --clean
        --prevent-strip
        --enable-system-libraries
        --disable-system-libraries
        --use-system-libraries
        --enable-system-libraries
        --disable-system-libraries
        --use-system-libraries
        --enable-static
        --disable-static
        --enable-cross-build
        --disable-cross-build
        --enable-cross-build
        --disable-cross-build
        --with-zlib-dir
        --without-zlib-dir
        --with-zlib-include=${zlib-dir}/include
        --without-zlib-include
        --with-zlib-lib=${zlib-dir}/lib
        --without-zlib-lib
        --with-iconv-dir
        --without-iconv-dir
        --with-iconv-include=${iconv-dir}/include
        --without-iconv-include
        --with-iconv-lib=${iconv-dir}/lib
        --without-iconv-lib
        --with-xml2-source-dir
        --with-xslt-source-dir
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:612:in
`block in execute': Failed to complete configure task (RuntimeError)
from
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:578:in
`chdir'
from
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:578:in
`execute'
from
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:188:in
`configure'
from
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:234:in
`cook'
        from extconf.rb:540:in `block (2 levels) in process_recipe'
        from extconf.rb:319:in `chdir'
        from extconf.rb:319:in `chdir_for_build'
        from extconf.rb:540:in `block in process_recipe'
        from <internal:kernel>:90:in `tap'
        from extconf.rb:438:in `process_recipe'
        from extconf.rb:887:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/extensions/arm64-darwin-23/3.3.0/nokogiri-1.14.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5
for inspection.
Results logged to
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/extensions/arm64-darwin-23/3.3.0/nokogiri-1.14.5/gem_make.out

  /opt/homebrew/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:125:in `run'
/opt/homebrew/lib/ruby/site_ruby/3.3.0/rubygems/ext/ext_conf_builder.rb:28:in
`build'
/opt/homebrew/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:193:in
`build_extension'
/opt/homebrew/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:227:in `block
in build_extensions'
  /opt/homebrew/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:224:in `each'
/opt/homebrew/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:224:in
`build_extensions'
/opt/homebrew/lib/ruby/site_ruby/3.3.0/rubygems/installer.rb:852:in
`build_extensions'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/rubygems_gem_installer.rb:76:in
`build_extensions'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/source/rubygems.rb:205:in
`install'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/installer/gem_installer.rb:54:in
`install'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/installer/parallel_installer.rb:132:in
`do_install'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/worker.rb:62:in
`apply_func'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/worker.rb:57:in
`block in process_queue'
  <internal:kernel>:187:in `loop'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/worker.rb:54:in
`process_queue'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.7/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'

An error occurred while installing nokogiri (1.14.5), and Bundler cannot
continue.

In Gemfile:
  theme-check was resolved to 1.15.0, which depends on
    nokogiri
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Installing nokogiri 1.14.5 with native extensions

Reproduction steps

  1. arch -arm64 brew tap shopify/shopify
  2. arch -arm64 brew install shopify-cli
  3. shopify theme dev and/or arch -arm64 shopify theme dev

Operating System

M1 Macbook - MacOS Sonoma 14.4.1 (23E224)

Shopify CLI version (check your project's package.json if you're not sure)

@shopify/cli/3.58.2 darwin-arm64 node-v21.7.2

Shell

zsh

Node version (run node -v if you're not sure)

v21.7.2

What language and version are you using in your application?

Ruby v3.3.0, Node v21.7.2, ALL INSTALLED BY Homebrew shopify-cli install

alexmorange commented 6 months ago

Also running into this.

bansavage commented 6 months ago

As an update, I have tried numerous troubleshooting steps:

  1. I have removed Homebrew and all packages. I then reinstalled Brew and then the CLI with the command brew tap shopify/shopify && brew install shopify-cli. Issue remains
  2. Tried installing with npm install -g @shopify/cli @shopify/theme and issue remains
  3. I have tried reinstalling CLI with MacOS system ruby (v2.6.0) and Homebrew Ruby package (v3.3.0). Neither ruby version fixes the issue

The error remains the same:

Error coming from `bundle install`

Command failed with exit code 5: bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/bansavage/Library/Caches/shopify-gems-nodejs/ruby/3.3.0/gems/nokogiri-1.14.5/ext/nokogiri
/opt/homebrew/opt/ruby/bin/ruby extconf.rb

The only temporary fix is to run export SHOPIFY_CLI_BUNDLED_THEME_CLI=1 though it seems very unstable

Seems like the gem "nokogiri-1.14.5" is blowing up..unsure of how to proceed.

alexislepresle commented 6 months ago

Same issue here

jcdatu1 commented 6 months ago

I just upgraded to 3.58.2 and when running Shopify theme dev, it does nothing

bansavage commented 6 months ago

Yes @jcdatu1, mine "does nothing" as well then vomits out the error shown above. Ever since the upgrade. I really wish we could get some support here...

bansavage commented 6 months ago

Confirming the newest version fixed this, should someone stumble upon this

alexislepresle commented 6 months ago

@bansavage me too :)

nikitaourazbaev commented 6 months ago

I’m still seeing this on 3.59.0.

Update: It stopped happening, not sure why. 3.59.0 works here, too.

ps-leocxy commented 5 months ago

I get the error on @shopify/cli@3.58.0.

It is working on @shopify/cli@3.59.0

Densz commented 2 months ago

Still got the issue, on my Macbook pro M2 using ARM.

shopify --version
@shopify/cli/3.59.0 darwin-arm64 node-v20.15.0

$ shopify theme dev --store=...

── external error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Error coming from `bundle install`

Command failed with exit code 1: bundle install
zsh:1: command not found: chruby
--- ERROR REPORT TEMPLATE -------------------------------------------------------

LoadError: cannot load such file -- zlib
  <internal:/Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
          <internal:/Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/fetcher.rb:7:in `<top (required)>'
          <internal:/Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
          <internal:/Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/cli/install.rb:50:in `run'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/cli.rb:244:in `block in install'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/settings.rb:158:in `temporary'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/cli.rb:243:in `install'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/cli.rb:34:in `dispatch'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/cli.rb:28:in `start'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/gems/3.3.0/gems/bundler-2.5.9/exe/bundle:28:in `block in <top (required)>'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/gems/3.3.0/gems/bundler-2.5.9/exe/bundle:20:in `<top (required)>'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/bin/bundle:25:in `load'
          /Users/dzheng/.rvm/rubies/ruby-3.3.1/bin/bundle:25:in `<main>'

Environment

Bundler       2.5.9
  Platforms   ruby, arm64-darwin-23
Ruby          3.3.1p55 (2024-04-23 revision c56cd86388092faec079981f779f140717020d58) [arm64-darwin-23]
  Full Path   /Users/dzheng/.rvm/rubies/ruby-3.3.1/bin/ruby
  Config Dir  /Users/dzheng/.rvm/rubies/ruby-3.3.1/etc
RubyGems      3.5.9
  Gem Home    /Users/dzheng/.rvm/gems/ruby-3.3.1
  Gem Path    /Users/dzheng/.rvm/gems/ruby-3.3.1:/Users/dzheng/.rvm/rubies/ruby-3.3.1/lib/ruby/gems/3.3.0
  User Home   /Users/dzheng
  User Path   /Users/dzheng/.gem/ruby/3.3.0
  Bin Dir     /Users/dzheng/.rvm/gems/ruby-3.3.1/bin
Tools
  Git         2.45.2
  RVM         1.29.12 (latest)
  rbenv       rbenv 1.2.0
  chruby

Bundler Build Metadata

Built At          2024-07-30
Git SHA           unknown
Released Version  false

## Bundler settings

path
  Set via BUNDLE_PATH: "/Users/dzheng/Library/Caches/shopify-gems-nodejs"
without
  Set via BUNDLE_WITHOUT: [:development, :test]

## Gemfile

### Gemfile

# NOTE: These are development-only dependencies
source "https://rubygems.org"

gem "bugsnag", "~> 6.22"
gem "listen", "~> 3.7.0"

# None of these can actually be used in a development copy of dev
# They are all for CI and tests
# `dev` uses no gems
group :development, :test do
  gem "pry-byebug"
  gem "byebug"
  gem "rubocop-shopify", require: false
  gem "rubocop-minitest", require: false
  gem "rubocop-rake", require: false
  gem "iniparse", "~> 1.5"
  gem "colorize", "~> 0.8.1"
  gem "bundler", ">= 2.3.11"
  gem "rake", "~> 12.3", ">= 12.3.3"
  gem "minitest", "~> 5.0"
end

group :test do
  gem "mocha", require: false
  gem "minitest-reporters", require: false
  gem "minitest-fail-fast", require: false
  gem "fakefs", ">= 1.0", require: false
  gem "webmock", require: false
  gem "timecop", require: false
  gem "rack", require: false
  gem "cucumber", "~> 7.0", require: false
end

### Gemfile.lock

<No /Users/dzheng/.nvm/versions/node/v18.17.1/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/Gemfile.lock found>

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=cannot+load+such+file+--+zlib&type=Issues

If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in
there.

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────