Permission denied error when running "shopify app dev"

Solved

Permission denied error when running "shopify app dev"

Muhammad_Mahad
Shopify Partner
2 0 0

I have shopify CLI version 3.72.2. When I run the command "shopify app dev", it give the following error 

╭─ error ──────────────────────────────────────────────────────────────────────────────╮
│ │
│ EACCES: permission denied, open │
│ '/usr/local/lib/node_modules/@shopify/cli/bin/cloudflared' │
│ │
│ What to try: │
│ - Run the command again │
│ - Add the flag `--tunnel-url {URL}` to use a custom tunnel URL │
│ │

I also tried to run the command with "sudo " but then it gives the following
Sorry, user is not allowed to execute '/usr/local/bin/shopify app dev' as root on "system_name"

Could anyone tell me what the issue is with it? or suggest me some other approach. 

Accepted Solution (1)

bmecler
Visitor
2 1 0

This is an accepted solution.

I noticed this file was missing:

'/usr/local/lib/node_modules/@shopify/cli/bin/cloudflared'

When I installed with 'npm install -g @Shopify/cli@latest' I noticed I got a lot of flack about not installing optional dependencies because of my npm version being too low. But I updated npm and the problem persisted. Some of the modules that it wouldnt install were cli tools and I guess Cloudflared was part of that.

 

I use wsl on windows and ended up installing the latest Ubuntu, re running the setup and this error was no longer presenting itself (along with all those dependency issues).

View solution in original post

Replies 2 (2)

bmecler
Visitor
2 1 0

I am new and following the guide here:
https://shopify.dev/docs/apps/build/scaffold-app

 

Same error:
╭─ error ──────────────────────────────────────────────────────────────────────╮
│ │
│ EACCES: permission denied, open │
│ '/usr/local/lib/node_modules/@shopify/cli/bin/cloudflared' │
│ │
│ What to try: │
│  Run the command again │
│ Add the flag `--tunnel-url {URL}` to use a custom tunnel URL

 

shopify help
A CLI tool to build for the Shopify platform

VERSION
@Shopify/cli/3.73.0 wsl-x64 node-v22.13.0

 

bmecler
Visitor
2 1 0

This is an accepted solution.

I noticed this file was missing:

'/usr/local/lib/node_modules/@shopify/cli/bin/cloudflared'

When I installed with 'npm install -g @Shopify/cli@latest' I noticed I got a lot of flack about not installing optional dependencies because of my npm version being too low. But I updated npm and the problem persisted. Some of the modules that it wouldnt install were cli tools and I guess Cloudflared was part of that.

 

I use wsl on windows and ended up installing the latest Ubuntu, re running the setup and this error was no longer presenting itself (along with all those dependency issues).