Skip to content

fix: resolve Cloudflare Worker deployment failure - #82

Merged
anoncam merged 2 commits into
mainfrom
fix/worker-deployment-public-directory
Sep 4, 2025
Merged

anoncam merged 2 commits into
mainfrom
fix/worker-deployment-public-directory

Conversation

@anoncam

@anoncam anoncam commented Sep 4, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • Removes unnecessary [site] configuration from wrangler.toml that was causing deployment failures
  • Fixes the ENOENT: no such file or directory, scandir './public' error

Problem

The deployment was failing because wrangler.toml contained a [site] section pointing to a ./public directory that doesn't exist in the repository. This configuration is unnecessary for dedpaste since it's a dynamic Cloudflare Worker using R2 storage, not a Workers Site serving static assets.

Solution

Removed the [site] section entirely from wrangler.toml. The Worker now deploys successfully without looking for non-existent static assets.

Test Results

✅ Local deployment successful after fix
✅ Worker deployed to https://dedpaste.pidof.workers.dev
✅ All bindings correctly configured (KV namespace and R2 bucket)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

The [site] section was causing deployment failures because it referenced
a non-existent /public directory. Since dedpaste is a dynamic Cloudflare
Worker using R2 storage (not a static site), this configuration section
was unnecessary and has been removed.

This resolves the deployment error:
ENOENT: no such file or directory, scandir './public'
- Remove 16 redundant and test markdown files
- Keep only essential documentation: README files, CLAUDE.md, and TODOs.md
- Update TODOs.md to reflect completed tasks:
  - Custom error classes implementation
  - CI/CD pipeline setup with GitHub Actions
  - Testing infrastructure basics
  - ESLint and Prettier configuration

This cleanup reduces repository clutter while preserving important
project documentation and tracking actual progress on tasks.
@anoncam
anoncam merged commit 96a3387 into main Sep 4, 2025
2 checks passed
github-actions Bot added a commit that referenced this pull request Sep 4, 2025
Version bump type: patch
PR: #82
Title: fix: resolve Cloudflare Worker deployment failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant