Devenv.nix does not exist

While following the instructions here: IHP Guide, I ran into an error running ./start. The error states that devenv.nix does not exist and I should run devenv init. Attempting to run devenv init gives an error message stating that the file /home/demo/blog/.envrc already exists.

`
[demo@nixos:~]$ cd blog

[demo@nixos:~/blog]$ ./start
Error: × File devenv.nix does not exist. To get started, run:

│ $ devenv init

[demo@nixos:~/blog]$ devenv up
Error: × File devenv.nix does not exist. To get started, run:

│ $ devenv init

[demo@nixos:~/blog]$ devenv init
Error: × File already exists /home/demo/blog/.envrc

[demo@nixos:~/blog]$ devenv up
Error: × File devenv.nix does not exist. To get started, run:

│ $ devenv init

`
I did run start once before I had installed devenv by adding it to my configuration.nix, so perhaps it was caused by that. What would be the best way to proceed? Should I just delete the .envrc file and try again?

Thanks for any help.

Are you using the latest IHP version?

make sure that after you cd blog you also direnv allow

devenv init shouldn’t be needed at all

It looks to me like the latest version:
`
[demo@nixos:~/blog]$ ihp-new --version

ihp-new version: 1.3.0
`
Ran “devenv allow”, I’m still getting the same message from ./start for now.

Can you try to run nix develop --impure and then devenv up?

Looks like that worked, it opened the IHP IDE in my browser, and the console is showing a curses app. The curses app interestingly lists the version in the top left as v1.2.0, not sure why that’s not consistent with what “ihp-new --version” gave me.

1 Like

How does it help? I never had to run it, so wondering what is the use case.

When direnv is not working for some reason (e.g. not loaded correctly in the shell), with nix develop we just do manually what direnv does automatically