6

I am trying to run the Plutus playground using the Gitbook recipe (https://docs.plutus-community.com/docs/setup/WindowsWSL.html). At step 15, the server starts fine, but trying to run the client with "npm run start" fails with the following

    [info] Copying from global cache: "tuples"
    [info] Copying from global cache: "web-html"
    [error] Installation failed
    [error] Error:
    [error] .spago/__download-catenable-lists-v5.0.1-1293619144260987/download: rename: permission denied (Permission denied)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] purs:compile: `spago build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] purs:compile script.

It seems that the npm script is trying to download something into a (read-only) nix store. How do I get the client to start?

I found some other issues (e.g. Installation failed on Ubuntu 20.04 in WSL on Windows 10 #689) reporting this error, but the reported fix is to close VSCode, so it is no longer accessing the build directories. I am not currently using VSCode. However, to make sure it was not some other lingering file contention, I restarted my PC and did nothing except the build on a newly restarted system. Same error.

4
  • Have you tried deleting .spago directory? The npm or spago for purescript builds are not using nix store when you invoke them directly.
    – sorki
    Jun 29, 2021 at 11:30
  • I deleted .spago. Still fails, same error on a different file. Per the cookbook instructions, I am running "npm run start" within a Nix shell, so all the files are within the nix store. Your comment implies that I should not be using nix-shell? Is that what you meant?
    – KenA
    Jun 29, 2021 at 13:01
  • No, you should be using nix-shell, it spawns a development shell for you with the required tools available but these have their own state directories. Also check if you have enough free space.
    – sorki
    Jun 30, 2021 at 8:18
  • 210 GB free on my C drive.
    – KenA
    Jun 30, 2021 at 12:15

2 Answers 2

1

I found a resolution to the problem.

In sheer frustration, I spun up a Windows Hyper-Visor VM and started provisioning it from scratch with WSL2, Nix, etc, and nothing else. After cloning the plutus repository, I got a strange git error (https://github.com/docker/for-win/issues/6284). The resolution was to move the git repository from the windows-hosted file system (e.g. C:...) to the Ubuntu-hosted file system (\WSL$/mnt...). Even though the systems are allegedly interoperable, apparently it is not perfect.

Re-cloning the plutus repository under my linux home directory caused the build problem to disappear. (I had been downloading under my Windows-home directory when the error occured.)

Now I can do my Plutus Pioneer homework...

0

I just tried to run this using the latest Plutus commit and received the same errors. I tried deleting various generated files with no luck. However, when I re-cloned the entire Plutus repo and tried again, all was good once more, so there was something hanging around that needed to be deleted, but not sure what it was.

If you haven't already, could you try deleting and re-cloning and see if that helps?

1
  • I deleted, cloned, checked out the commit referenced in week01 cabal.build and reexecuted the recipe. I still get the same error - ".spago/__download-aff-v5.1.2-db16975bf2436f41/download: rename: permission denied (Permission denied)"
    – KenA
    Jun 29, 2021 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.