Hey everyone, I’m in a bit of a pickle here. I’ve been trying to update my test Shopify app to work with the new CLI 3.0, but I’ve run into some issues. I’m using a Mac with Catalina 10.15.17 along with Node 16.15.1 and Ruby 2.6.3p62. I followed the migration guide by moving my code to the /web folder, setting up the necessary configuration files, and running sudo npm install
. However, I encountered a permission error related to ngrok that stops the installation, saying it can’t store the binary file. Does anyone have advice on what might be causing this issue, possibly related to file permissions, or steps that I might be missing?
I’ve been through a similar situation updating my Shopify app, and it can be frustrating. The ngrok permission error you’re facing is likely due to system-level restrictions on Catalina. Here’s what worked for me:
Instead of using sudo, try running the installation with the --unsafe-perm flag:
npm install --unsafe-perm
This bypasses some of the stricter permission checks. If that doesn’t work, you might need to manually install ngrok separately and then point Shopify CLI to use that installation.
Another thing to check is your Node version. While 16.15.1 should work, I found updating to the latest LTS version resolved some weird issues I was having.
Lastly, make sure your .gitignore file is updated to exclude the right folders for CLI 3.0. The migration guide doesn’t always catch everything, and leftover files can cause conflicts.
Hope this helps! Let me know if you need more specifics on any of these steps.
I encountered a similar issue when upgrading to CLI 3.0. The ngrok permission error is likely due to macOS security features. Have you tried running the installation without sudo? Sometimes, using sudo can cause more problems than it solves.
One workaround that worked for me was to manually download and install ngrok, then configure Shopify CLI to use that installation. You can do this by setting the SHOPIFY_NGROK_BINARY_PATH environment variable to point to your ngrok executable.
Also, double-check your Node version. While 16.15.1 should be compatible, I found that upgrading to the latest LTS version resolved some unexpected issues. It might be worth giving that a try if other solutions don’t work.
If you’re still stuck, you might want to consider using a virtual environment or Docker to isolate your development setup. This can help avoid conflicts with system-wide settings and permissions.