<p>I found a resolution to the problem.</p>
<p>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 (<a href="https://github.com/docker/for-win/issues/6284" rel="nofollow noreferrer">https://github.com/docker/for-win/issues/6284</a>).  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.</p>
<p>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.)</p>
<p>Now I can do my Plutus Pioneer homework...</p>

CC BY-SA 4.0
2021-06-30T17:58:53.460Z
2021-07-02T10:20:55.677Z
2021-07-02T10:20:55.677Z
KenA
<p>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.</p>
<p>If you haven't already, could you try deleting and re-cloning and see if that helps?</p>

CC BY-SA 4.0
2021-06-29T15:52:23.127Z
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
CC BY-SA 4.0
2021-06-29T14:18:16.070Z
2021-06-29T14:18:16.070Z
Chrismo
<p>I am trying to run the Plutus playground using the Gitbook recipe (<a href="https://docs.plutus-community.com/docs/setup/WindowsWSL.html" rel="nofollow noreferrer">https://docs.plutus-community.com/docs/setup/WindowsWSL.html</a>).
At step 15, the server starts fine, but trying to run the client with &quot;npm run start&quot; fails with the following</p>
<pre><code>    [info] Copying from global cache: &quot;tuples&quot;
    [info] Copying from global cache: &quot;web-html&quot;
    [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! plutus-playground-client@1.0.0 purs:compile: `spago build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the plutus-playground-client@1.0.0 purs:compile script.
</code></pre>
<p>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?</p>
<p>I found some other issues (e.g. <a href="https://github.com/purescript/spago/issues/689" rel="nofollow noreferrer">Installation failed on Ubuntu 20.04 in WSL on Windows 10 #689</a>) 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.</p>

CC BY-SA 4.0
2021-06-29T11:30:27.237Z
Have you tried deleting `.spago` directory? The `npm` or `spago` for `purescript` builds are not using nix store when you invoke them directly.
sorki
CC BY-SA 4.0
2021-06-29T13:01:04.813Z
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
CC BY-SA 4.0
2021-06-30T08:18:25.427Z
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
CC BY-SA 4.0
2021-06-30T12:15:44.710Z
210 GB free on my C drive.
KenA
<plutus><plutus-pioneer-program><plutus-playground>
npm build of plutus client fails with "permission denied"
# npm build of plutus client fails with "permission denied"

(Asked by: username_0 on 2021-06-29)

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! plutus-playground-client@1.0.0 purs:compile: `spago build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the plutus-playground-client@1.0.0 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.

**Tags:** plutus, plutus-pioneer-program, plutus-playground
> **Comments:**
> **username_1**: Have you tried deleting `.spago` directory? The `npm` or `spago` for `purescript` builds are not using nix store when you invoke them directly.  
> **username_0**: 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?  
> **username_1**: 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.  
> **username_0**: 210 GB free on my C drive.  

---

## 2 answers

### Answer by username_0 on 2021-06-30. Score: 1 | Accepted answer

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...


---

### Answer by username_2 on 2021-06-29. Score: 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?

> **Comments:**
> **username_0**: 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)"  

---

