-1
error[E0432]: unresolved import `actix_web_lab::web::spa`
  --> backend/src/main.rs:14:5
   |
14 | use actix_web_lab::web::spa;
   |     ^^^^^^^^^^^^^^^^^^^^^^^ no `spa` in `web`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `backend` (bin "backend") due to previous error

already try this in directory but still did not work

cargo add actix-web-lab
Or add the following line to your Cargo.toml:

actix-web-lab = "0.19.1"
Chayim Friedman
  • 47,971
  • 5
  • 48
  • 77

1 Answers1

0

The docs on spa() clearly state:

Available on crate feature spa only.

So you need to enable this feature. E.g. with cargo add:

cargo add actix-web-lab --features spa

Or by changing Cargo.toml:

actix-web-lab = { version = "0.19.1", features = ["spa"] }
Chayim Friedman
  • 47,971
  • 5
  • 48
  • 77