TheWaWaR / TheWaWaR/simple-http-server

NotFound

Open
#112 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
3.5k
Forks
219
PR merge metrics
No merged PRs in 30d

Description

I'm sorry to open this Issue, but it's driving me nuts.

I installed simple-http-server to replace a python command python3 -m http.server 8080. It worked fine when I first installed it (and ran with https://crates.io/crates/cargo-make/)

Makefile.toml

[tasks.serve]
command = "simple-http-server"
args = ["-i", "./www/", "-p", "7878", "--nocache"]

I did something, like did a fresh checkout or I use GitHub Codespaces and I ran into this error:

$ cargo make serve
[cargo-make] INFO - cargo make 0.37.12
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Project: rkp
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: serve
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "simple-http-server" "-p" "7878" "--nocache" "--try-file" "./www/index.html"
[cargo-make] ERROR - Error while executing command, error: Os {
    code: 2,
    kind: NotFound,
    message: "No such file or directory",
}
[cargo-make] WARN - Build Failed.

the problem is that the exact command works on my local, but does not work on another machine that was recently set up by another engineer and it does not work in a new GitHub codespace (so new env setup is the culprit).

my issue that that SOMEHOW I fixed the error above, but I don't remember what I did to fix it. and now this new engineer is observing this issue (as am I in GH codespaces, but NOT on my local where it was originally working before and still works with no changes to the git-committed code).

should I be looking for something like file permissions to resolve this issue?

working on my local:

cargo make serve
[cargo-make] INFO - cargo make 0.37.10
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Project: rkp
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: serve
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "simple-http-server" "-i" "./www/" "-p" "7878" "--nocache"
     Index: enabled, Cache: disabled, Cors: disabled, Coop: disabled, Coep: disabled, Range: enabled, Sort: enabled, Threads: 3
          Upload: disabled, CSRF Token: 
          Auth: disabled, Compression: disabled
         https: disabled, Cert: , Cert-Password: 
          Root: /Users/.../www,
    TryFile404: 
       Address: http://0.0.0.0:7878
    ======== [2024-05-07 17:23:17] ========

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Makefile.toml and the cargo make serve task, then reproduce the command in a fresh checkout or GitHub Codespace. Compare whether simple-http-server is available in the environment and whether the task reaches ./www/; done should identify the setup difference and document or correct the required setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.