I’m stuck upgrading my shopify application to CLI 3.0 and getting permission errors
Hey everyone! I’ve been trying to update my shopify app to use the new CLI version 3.0 following the official migration guide. I’m running into some issues that I can’t seem to fix.
My setup:
- macOS Catalina 10.15.17
- Node.js: 16.15.1
- Ruby: 2.6.3p62
- Current Shopify CLI: 2.19.0
What I did so far:
- Moved all my source code into the
/webdirectory - Created the required config files (
web/shopify.web.tomlandshopify.app.toml) - Set up the new
package.jsonfile - Ran the installation command
The problem:
When I execute sudo npm install, the process fails during ngrok setup with permission errors:
npm ERR! code 1
npm ERR! path /Users/john/my-shop-app/node_modules/@shopify/ngrok
npm ERR! command failed
npm ERR! ngrok - error storing binary to local file [Error: EACCES: permission denied, open '/Users/john/.ngrok/binary-file.zip']
npm ERR! errno: -13
npm ERR! code: 'EACCES'
npm ERR! syscall: 'open'
npm ERR! ngrok - install failed, retrying
The error keeps repeating and eventually the whole installation fails. Has anyone run into this before? What’s the best way to fix these permission issues?