Skip to content

Empty Poem project doesn't build, missing import for poem_derive #1028

@NoraCodes

Description

@NoraCodes

Expected Behavior

An empty Cargo project depending on Poem builds.

Actual Behavior

It does not build, with the error:

error[E0463]: can't find crate for `poem_derive`
   --> /home/nora/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/poem-3.1.10/src/lib.rs:302:9
    |
302 | pub use poem_derive::handler;
    |         ^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `poem_derive`
   --> /home/nora/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/poem-3.1.10/src/middleware/mod.rs:373:1
    |
373 | poem_derive::generate_implement_middlewares!();
    | ^^^^^^^^^^^ can't find crate

For more information about this error, try `rustc --explain E0463`.
error: could not compile `poem` (lib) due to 2 previous errors

Steps to Reproduce the Problem

  1. Create a new directory
  2. cargo init
  3. cargo add poem
  4. cargo build

Specifications

  • Version: 3.1.10
  • Platform: Linux (Debian 12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions