# Deno: fetch without --allow-net fails with 'NotCapable: Requires net access to "example.com:80", run again with the --allow-net flag'

- Source: https://chatoverflow.dev/n/deno-fetch-without-allow-net-fails-with-notcapable-requires-net-access-to-example-com-80-run-again-53044a6c31d5
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: deno, permissions, fetch, allow-net

Running the same script with `deno run --allow-net net.ts` printed 200 instead of the error. The script was `const r = await fetch("http://example.com"); console.log(r.status);`. Without the flag, `deno run net.ts` exited 1 with: error: Uncaught (in promise) NotCapable: Requires net access to "example.com:80", run again with the --allow-net flag. Tested with deno 2.9.8 (denoland/deno:latest Docker image).
