Error Installing wdm Gem in Shopify App Development

I’m encountering an issue while setting up my Shopify app development environment. When running npm run dev, I’m seeing the following error related to the wdm gem installation:

It appears to be related to native extensions during gem installation. Any insights or solutions on how to resolve this would be greatly appreciated.

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

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:
C:/Users/Admin/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.3.0/gems/wdm-0.1.1/ext/wdm
C:/Ruby33-x64/bin/ruby.exe extconf.rb
checking for -lkernel32... yes
checking for windows.h... yes
checking for ruby.h... yes
checking for HAVE_RUBY_ENCODING_H... yes
checking for rb_thread_call_without_gvl()... yes
creating Makefile

current directory:
C:/Users/Admin/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.3.0/gems/wdm-0.1.1/ext/wdm
make DESTDIR\= sitearchdir\=./.gem.20240701-5008-wwxeki
sitelibdir\=./.gem.20240701-5008-wwxeki clean

current directory:
C:/Users/Admin/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.3.0/gems/wdm-0.1.1/ext/wdm
make DESTDIR\= sitearchdir\=./.gem.20240701-5008-wwxeki
sitelibdir\=./.gem.20240701-5008-wwxeki
generating wdm_ext-x64-mingw-ucrt.def
compiling entry.c
compiling memory.c
compiling monitor.c
compiling queue.c
compiling rb_change.c
rb_change.c: In function 'extract_absolute_path_from_notification':
rb_change.c:139:5: warning: 'RB_OBJ_TAINT' is deprecated: taintedness turned out
to be a wrong idea. [-Wdeprecated-declarations]
  139 |     OBJ_TAINT(path);
      |     ^~~~~~~~~
In file included from
C:/Ruby33-x64/include/ruby-3.3.0/ruby/internal/core/rstring.h:30,
from
C:/Ruby33-x64/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29,
from
C:/Ruby33-x64/include/ruby-3.3.0/ruby/internal/arithmetic.h:24,
                 from C:/Ruby33-x64/include/ruby-3.3.0/ruby/ruby.h:28,
                 from C:/Ruby33-x64/include/ruby-3.3.0/ruby.h:38,
                 from wdm.h:22,
                 from rb_change.c:4:
C:/Ruby33-x64/include/ruby-3.3.0/ruby/internal/fl_type.h:824:1: note: declared
here
  824 | RB_OBJ_TAINT(VALUE obj)
      | ^~~~~~~~~~~~
compiling rb_monitor.c
rb_monitor.c: In function 'rb_monitor_run_bang':
rb_monitor.c:509:29: error: implicit declaration of function
'rb_thread_call_without_gvl' [-Wimplicit-function-declaration]
509 |         waiting_succeeded = rb_thread_call_without_gvl(wait_for_changes,
monitor->process_event, stop_monitoring, monitor);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:248: rb_monitor.o] Error 1

make failed, exit code 2

Gem files will remain installed in
C:/Users/Admin/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.3.0/gems/wdm-0.1.1
for inspection.
Results logged to
C:/Users/Admin/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.3.0/extensions/x64-mingw-ucrt/3.3.0/wdm-0.1.1/gem_make.out

  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:125:in `run'
  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:51:in `block in make'
  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:43:in `each'
  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:43:in `make'
  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/ext_conf_builder.rb:42:in `build'
  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:193:in `build_extension'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:227:in `block in
build_extensions'
  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `each'
  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `build_extensions'
  C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/installer.rb:852:in `build_extensions'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/rubygems_gem_installer.rb:79:in
`build_extensions'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/source/rubygems.rb:205:in
`install'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/installer/gem_installer.rb:54:in
`install'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/installer/parallel_installer.rb:132:in
`do_install'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/worker.rb:62:in
`apply_func'
C:/Users/Admin/.local/share/gem/ruby/3.3.0/gems/bundler-2.5.14/lib/bundler/worker.rb:57:in
`block in process_queue'

Same error here when I run this:

shopify theme dev --store

Solved with this Anwser.

1 Like

shopify theme dev --store
╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Flag --store expects a value │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

This answer is the one that helped me combined with this other. Thanks!

https://community.shopify.com/c/shopify-cli-and-tools/quot-error-failed-to-build-gem-native-extension-quot-after/m-p/2536884#M4403

I am getting same error, Did you find any solution?