Error: proc macro `main` not expanded: Cannot create expander for
Full error message
I want to run a web server with Rust and Actix-Web. After following these steps of their documentation everything works as expected: the server runs on port 8080.
The problem I have is that VSCode shows errors
This error message is shown in the tooltip upon hovering the error in the IDE
proc macro main not expanded: Cannot create expander for /Users/name/Documents/projects/project-rust/target/debug/deps/libactix_web_codegen-b262af45f63000f3.dylib: Io(Custom { kind: InvalidData, error: DlOpen { desc: "dlopen(/Users/name/Documents/projects/project-rust/target/debug/deps/libactix_web_codegen-b262af45f63000f3.dylib, 0x000A): tried: '/Users/name/Documents/projects/project-rust/target/debug/deps/libactix_web_codegen-b262af45f63000f3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libactix_web_codegen-b262af45f63000f3.dylib' (no such file), '/usr/lib/libactix_web_codegen-b262af45f63000f3.dylib' (no such file)" } })
Environemnt - macOS Monterey 12.1 (M1)Solutionsource: stackoverflow \u2197
VS Code Thanks, @Smitop for the tip I reinstalled VSCode with universal build and the errors are gone P.S. I tried to install the build for Apple Silicon, but it didn't help NVIM (macOS, arm64, m1) For those experiencing the same issue in NeoVim, the following steps helped resolve the errors. Open a terminal Execute rustup toolchain list It should print stable-aarch64-apple-darwin (default) stable-x86_64-apple-darwin Copy the stable-x86_64-apple-darwin and make it default, by using rustup default stable-x86_64-apple-darwin Re-open NeoVim. Errors should disappear
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/63a264f93cca0bb0401a8a545b577f4c018ad80ae78c34623e6fe805b9a96036hash \u00b7 63a264f93cca0bb0401a8a545b577f4c018ad80ae78c34623e6fe805b9a96036