Open patmead opened 7 months ago
I'm facing this exact issue on Arch Linux (same versions as above).
Downgrading flori/json from 2.7.1 to 2.6.3 fixes it.
That's this package on Arch (working version is 2.6.3-1).
The issue was raised here in Jan: https://github.com/Shopify/cli/issues/3221
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
This issue is still relevant
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
Still relevant.
stilll relevent
Still relevant - executing 'shopify theme dev --store storename' presents the same issue of being unable to load JSON.
[Note] You cannot use gems with Shopify CLI.
[LoadError] cannot load such file -- json
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
[Note] You cannot use gems with Shopify CLI.
[LoadError] cannot load such file -- json
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
/home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15:in `require': cannot load such file -- json (LoadError)
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15:in `require'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/context.rb:6:in `<top (required)>'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15:in `require'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15:in `require'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli.rb:133:in `<module:ShopifyCLI>'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli.rb:42:in `<top (required)>'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15:in `require'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15:in `require'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/load_shopify.rb:18:in `<top (required)>'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:52:in `require_relative'
from /home/REDACTED/.npm-global/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:52:in `<main>'
Hey @flortsch @nihanmubashshir @gil-roboute,
Could you please confirm if you're also facing this issue on Arch Linux? Also, could you please confirm the Ruby version you have?
Thanks a lot for reporting this!
Hey @flortsch @nihanmubashshir @gil-roboute,
Could you please confirm if you're also facing this issue on Arch Linux? Also, could you please confirm the Ruby version you have?
Thanks a lot for reporting this!
I am using Manjaro Linux (Arch derivative) and current Ruby version is 3.0.6-1.
Thanks,
Hello @gil-roboute, thank you for reporting this issue. The Shopify CLI doesn't officially support Arch Linux, we only support apt
and yum
for other linux distributions.
Hi @lucyxiang be that as it may, I don't believe this to be an issue with my particular distro as I've had the same issue on my Windows 10 machine; I believe this is a Ruby versioning problem because I had to install a particular version of Ruby in order for the error to resolve on Windows.
Perhaps the next CLI update will bring everything into line and add support for Ruby 3.0.6-1; I do not like developing on a Windows based machine but I guess I will have to until this is resolved.
Hey @flortsch @nihanmubashshir @gil-roboute,
Could you please confirm if you're also facing this issue on Arch Linux? Also, could you please confirm the Ruby version you have?
Thanks a lot for reporting this!
Can confirm the issue on Arch Linux. Ruby version is 3.0.6p216. It would be nice, if local / project-specific Ruby gems could be used with shopify-cli. Then, one could simply install an older version of ruby-json as a gem / project dependency instead of downgrading the system package.
@gil-roboute we're working to remove Ruby as a dependency in the CLI, I appreciate the patience for now 🙏
Still relevant. on Arch WSL
A few days ago, I got a ruby update on my Arch install. It seems that ruby and many sub-modules (such as the json module) where merged into the main ruby package. Also, ruby got updated to 3.2.4. I am now running shopify-cli 3.60.1 and I no longer have the json issue. Can someone confirm this as well?
Full Manjaro release update - still receiving the below and the error messages contained in 'details' - half tempted to spin up a Debian VM and tolerate it so I don't have to use some Windows garbage to test themes.
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
[Note] You cannot use gems with Shopify CLI.
[LoadError] cannot load such file -- json
/usr/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15:in `require'
/usr/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15:in `require'
/usr/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/context.rb:6:in `
I have ruby 3.2.4 and shopify/cli 3.65.3 and there is same error (arch)
Shopify CLI 3.66.1 OS linux-amd64 Node version v22.8.0 Ruby version 3.2.5
Still same issue
I had almost the same problems but with erb
, it seems that the system functions were overwritten by ruby-json/ruby-erb, to fix this I had to downgrade it and find the right version. (in fact i used the last version)
I'm using Arch, ruby 3.2.5, node 18.20.4 and the last version of the Shopify CLI,
sudo downgrade ruby-json
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
After authenticating, the CLI should be able to retrieve theme files using
shopify theme pull
Actual behavior
It fails with the error below, despite the CLI not having been modified locally in any way.
Verbose output
Reproduction steps
npm install -g @shopify/cli @shopify/theme
shopify version
shopify theme pull
(authenticate if required)Operating System
Arch Linux
Shopify CLI version (check your project's
package.json
if you're not sure)3.55.1
Shell
bash
Node version (run
node -v
if you're not sure)v21.6.1
What language and version are you using in your application?
Liquid