Problem running nix develop

I’m trying to run

nix develop

but I’m getting:

nix develop
error: getting status of ‘/nix/store/sqxk5k3zgr9pvblrkmzkxfcn348g79d4-source/flakes’: No such file or directory

This is running NixOS on WSl-2

Any suggestions on how to fix

Hard to say when there’s not any information about how the project directory and flake.nix is looking like. I often get the No such file or directory error as a result of forgetting to add the files I’m working with to git (either by staging them temporarily or committing them). But it could be caused by other things as well.

Could you share some more information about what you’ve done and what you’re trying to achieve?

I fell victim to the issue documented in:

flakes: nix shell (and similar) fails, if flakes.nix inside a git-repo ist no yet added to the repo (error: getting status of ‘/nix/store/…/flake.nix’: No such file or directory) · Issue #6642 · NixOS/nix (github.com)

Fixing the error message to one of the suggestions listed in the above issue would be a very helpful addition.