-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access Denied (os error 5) #681
Comments
Hard to tell for me (as I am not using Windows). It seems it works for others, so some more investigation (help) is needed with this one. One reason for Windows to report access denied (IIRC) can also be that the file is already open by another process. |
The problem is that Is there a common place where trunk do path resolution? If so I can create a quick fix. |
That's a problem 🙄 … glad one could still use I don't recall there being a single spot. Here are some common functions around that topic: https://github.com/trunk-rs/trunk/blob/main/src/common.rs But I also know that |
I assume you're talking about this one: rust-lang/rust#42869 |
Yes I believe that to be the underlying issue. In the pass I have gotten the same access denied when try to put canonical path into a tool that do not support it. My fix in was 2 string replace one to remove the |
Well that path (and the current issue) is using |
Just did a quick test. #[tokio::main]
async fn main() {
let from = tokio::fs::canonicalize("./test").await.unwrap();
let to = "./test2";
println!("rename from {from:?} to {to:?}");
tokio::fs::rename(from, to).await.unwrap();
} Output: |
Thanks for testing! So we can rule out that cause, right? |
Yes sadly have my own problem that took me to this issue. But can't look into that before until this evening. Based on this discussion windows + canonicalize + commands = danger. |
I did get a Access Denied on windows trying to create the ./target dir. But not for target build there I got a lot of random garbage build error. Option not defined that kind of thing. Finally found my issue: Forgot to run: |
This is not the problem, because I have it up to date I already had it installed but still get this error somehow... |
I think right now the problem is not understood. So that question is: what is broken? … I do understand it doesn't work for you, but others don't seem to have this issue. So I wouldn't rule out some issue/difference with your local system. And I do know that this can be frustrating, but also try to understand that without being able to reproduce, it's hard to get an understanding of the problem. Maybe switching to WSL helps? |
Ran into a similar issue trying to give Leptos a crack for the first time. Might sound silly, but manually creating the |
Looks like we can close the issue. I am not sure what trunk could do better. |
By adding these commands to the instructions, the getting started guide is more failsafe. It looks like I have this error: trunk-rs/trunk#681
With every yew app I'm trying to serve using
trunk serve
I get this annoying error:I beg for a simple answer for fixing this problem and not a simple read the doc answer plz, been stuck for a long time and has already browsed on everything on the internet available for this answer and nothing worked.
Setup:
cargo install --locked trunk
(trunk 0.18.6)Get-ExecutionPolicy -List
:Get-AppLockerPolicy -Effective
:The text was updated successfully, but these errors were encountered: