holochain-open-dev / templates

Templates to build modules and apps in the holochain-open-dev style
14 stars 2 forks source link

Scaffolding command for new app fails due to lock file error #8

Open jost-s opened 4 months ago

jost-s commented 4 months ago

When I execute the command to scaffold a new app under macOS, I get the following error:

$ nix run github:holochain-open-dev/templates#hc-scaffold-app-template -- web-app
do you want to allow configuration setting 'extra-substituters' to be set to 'https://holochain-open-dev.cachix.org' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? y
do you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'holochain-open-dev.cachix.org-1:3Tr+9in6uo44Ga7qiuRIfOTFXog+2+YbyhwI/Z6Cp4U=' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? y
error:
       … while updating the lock file of flake 'github:holochain-open-dev/templates/aefe91aa3fae296e5c7e685fc413696f0adfb46c'

       error: cannot write modified lock file of flake 'github:holochain-open-dev/templates' (use '--no-write-lock-file' to ignore)

Executing the same command with the suggested option succeeds

$ nix run github:holochain-open-dev/templates#hc-scaffold-app-template --no-write-lock-file -- web-app
guillemcordoba commented 4 months ago

This should be fixed now, could you try it out again?

jost-s commented 4 months ago

It still shows the same error for me when running the above command.

guillemcordoba commented 4 months ago

Hum can you try it with refresh? Maybe it's still cached?

nix run github:holochain-open-dev/templates#hc-scaffold-app-template --refresh -- web-app

I did try it on a MacOS and it worked...

jost-s commented 4 months ago

I don't know what's happening, but I get the same

$ nix run github:holochain-open-dev/templates#hc-scaffold-app-template --refresh -- web-app
error:
       … while updating the lock file of flake 'github:holochain-open-dev/templates/e443646c27ceee63e383e856aba73409c1879b74'

       error: cannot write modified lock file of flake 'github:holochain-open-dev/templates' (use '--no-write-lock-file' to ignore)
guillemcordoba commented 4 months ago

Really interesting... What's your nix version? Maybe this is a bug in nix?

jost-s commented 4 months ago

I have nix 2.18.2