Shopify CLI error: cannot use gems with Shopify CLI, cannot load such file

578 Views Asked by At

I'm starting to learn Shopify CLI via this tutorial, and am having some issues. I initially installed the CLI using Home-brew with brew tap shopify/shopify and brew install shopify-cli. Upon checking the Shopify version to ensure that it was installed correctly, I ran the command shopify --version, and received @shopify/cli/3.40.1 darwin-x64 node-v19.6.0. I was able clone the Dawn theme in my project folder with shopify theme init, and was able to select my Shopify store.

The issue lies with when I attempt to run the command shopify theme dev, where I am redirected to a login page, and get the below error upon a successful login:

[Note] You cannot use gems with Shopify CLI.
[LoadError] cannot load such file -- listen
       They are disabled.
       Please don't modify the CLI locally.
       If you would like to contribute to the CLI project, please refer to
       https://github.com/Shopify/shopify-cli/blob/main/.github/CONTRIBUTING.md

✗ An unexpected error occured.
    To submit an issue include the stack trace.
    To print the stack trace, add the environment variable SHOPIFY_CLI_STACKTRACE=1.

[Note] You cannot use gems with Shopify CLI.
[LoadError] cannot load such file -- bugsnag
       They are disabled.
       Please don't modify the CLI locally.
       If you would like to contribute to the CLI project, please refer to
       https://github.com/Shopify/shopify-cli/blob/main/.github/CONTRIBUTING.md 

I've tried several ways to troubleshoot this from previous posts such as using gem install wdm, to which I get an error that states :

ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

I've checked the gem version using gem --version , to which I get 3.0.3.1. I have also confirmed that I am the store owner of the shopify store per the caution block on the documentation.

Though not recommended, I've also tried using the sudo gem install wdm command, but I still have the same error from the first code block when running theme dev. Any help would be greatly appreciated!

0

There are 0 best solutions below