LlamaEdge / rag-api-server

A RAG API server written in Rust following OpenAI specs
https://llamaedge.com/docs/user-guide/server-side-rag/quick-start
Apache License 2.0
21 stars 7 forks source link

so many issues when cargo build #1

Open npmstudy opened 4 months ago

npmstudy commented 4 months ago
error[E0433]: failed to resolve: use of undeclared crate or module `hyper`
  --> /Users/npmstudy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest_wasi-0.11.16/src/async_impl/response.rs:35:30
   |
35 |         res: hyper::Response<hyper::Body>,
   |                              ^^^^^ use of undeclared crate or module `hyper`

Some errors have detailed explanations: E0412, E0422, E0432, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `reqwest_wasi` (lib) due to 104 previous errors
warning: build failed, waiting for other jobs to finish...
alabulei1 commented 4 months ago

Hi @npmstudy

Sorry for the late reply. Can you provide me with the specific steps to reproduce the problem you met?

suryyyansh commented 4 months ago

I had a similar issue. What I did was, removed EVERYTHING rust related (rustup, rustc, cargo) and then reinstalled rustup, did rustup target add wasm32-wasi, and finally the build proceeded as normal.

Since you mentioned nothing about rustup target add, you should probably do that first before the rest of the stuff mentioned above.

Basically, just make sure you don't have duplicate versions of rust.

alabulei1 commented 4 months ago

I had a similar issue. What I did was, removed EVERYTHING rust related (rustup, rustc, cargo) and then reinstalled rustup, did rustup target add wasm32-wasi, and finally the build proceeded as normal.

Since you mentioned nothing about rustup target add, you should probably do that first before the rest of the stuff mentioned above.

Basically, just make sure you don't have duplicate versions of rust.

Hi @npmstudy , please check out @suryyyansh 's comment, which is very useful.