Search code examples
rubyrubygemsshopifyshopify-app

installing shopify-cli on Windows


I tried installing the Shopify app CLI through the command:

gem install shopify-cli

Output:

ERROR:  Error installing shopify-cli:
        "theme-check-language-server.bat" from theme-check conflicts with C:/Ruby27-x64/bin/theme-check-language-server.bat

Any help is appreciated.


Solution

  • Please visit this site maybe it's helpful to you.

    https://shopify.dev/docs/themes/tools/cli

    Follow bellow Steps for CLI:-

    Step 1: Install new requirementsAnchor link to section titled "Step 1: Install new requirements" In addition to the requirements for Shopify CLI 2.x, Shopify CLI 3.x requires Node.js 14.17.0 or higher. If you use macOS, then Homebrew will install Node.js for you when you upgrade to the latest version of Shopify CLI.

    For a complete list of requirements, refer to Install Shopify CLI.

    Step 2: Uninstall Shopify CLI 2.xAnchor link to section titled "Step 2: Uninstall Shopify CLI 2.x" Consider uninstalling the previous version of Shopify CLI. Uninstalling the previous version avoids any collisions between the two versions.

    If you want to keep both versions of Shopify CLI installed, then refer to Using both Shopify CLI 2.x and 3.x to learn how to work with both versions in the same environment.

    Shopify CLI can be removed from your system using the same package manager that you used to install it:

    Terminal

    gem uninstall shopify-cli If you’re using a legacy version of Shopify CLI (lower than 0.9.0), then you need to uninstall it manually.

    Step 3: Install Shopify CLI 3.xAnchor link to section titled "Step 3: Install Shopify CLI 3.x" Shopify CLI is managed as a set of Node.js packages:

    @shopify/cli @shopify/theme

    You can install these packages using Homebrew on macOS, or by installing the packages globally on Windows or Linux.

    Note apt, Yum, and RubyGems installations are no longer supported.

    MACOSAnchor link to section titled "MacOS" You can install Shopify CLI on macOS using Homebrew.

    You need to add Shopify's third-party repositories to Homebrew using brew tap before you can install Shopify CLI.

    Terminal

    brew tap shopify/shopify brew install shopify-cli

    Note Homebrew installs all of the requirements for running Shopify CLI, including Ruby, Node.js, and Git, for you.

    WINDOWS AND LINUXAnchor link to the section titled "Windows and Linux" To install Shopify CLI for themes, install the @shopify/cli and @shopify/theme Node.js packages globally using the command line.

    Terminal

    npm install -g @shopify/cli @shopify/theme Step 4: Verify the installationAnchor link to the section titled "Step 4: Verify the installation" To verify that Shopify CLI is installed properly, run the following command: