<p>I believe your issue is stemming from the fact that the plutus team is updating the plutus library relatively quickly, and since the code written in the plutus-pioneer-program is now a month or two old, it is outdated and will only compile on the older version of the plutus playground.</p>
<p>I suggest you keep using the publicly hosted playground and then eventually move over to cabal and the terminal.</p>

CC BY-SA 4.0
2021-06-22T21:47:02.087Z
Yep, thats the plan for me going forward, it does the job but if I manage to find some workaround to it I'll post my solution, thanks!
Conor Devlin
CC BY-SA 4.0
2021-06-22T21:32:46.167Z
2021-06-22T21:32:46.167Z
Isaac Padberg
<p>You can run the Playground locally in Week 3 if you checkout the Plutus branch referenced in the Week03 <code>cabal.project</code>. See the <code>tag</code> option below.</p>
<pre><code>source-repository-package
  type: git
  location: https://github.com/input-output-hk/plutus.git
  subdir:
    freer-extras
    playground-common
    plutus-core
    plutus-contract
    plutus-ledger
    plutus-ledger-api
    plutus-tx
    plutus-tx-plugin
    prettyprinter-configurable
    quickcheck-dynamic
  tag: 3aa86304e9bfc425667051a8a94db73fcdc38878
</code></pre>

CC BY-SA 4.0
2021-06-23T11:13:02.603Z
2021-06-23T11:13:02.603Z
Frank DelPidio
<p>These are exactly the same errors that I get when I try to compile the Week 3 code with the latest Plutus master, so there is nothing wrong with your setup.</p>
<p>I was migrating the code to work with the master branch, but there have been a lot of Plutus changes since the Week 3 code was written which involved a lot of head scratching trying to figure out what was what.</p>
<p>As other posters have mentioned, checking out the correct commit should fix this for you.</p>

CC BY-SA 4.0
2021-06-25T01:26:11.333Z
2021-06-25T01:26:11.333Z
Chrismo
<p>I seem to be getting a compilation error when I try to compile any of the example files on my local host configuration for the Plutus Playground. The error is pictured here: <a href="https://i.sstatic.net/HDHxa.png" rel="noreferrer"><img src="https://i.sstatic.net/HDHxa.png" alt="enter image description here" /></a>
And basically it seems that no matter which example file I try and run I always end up getting a deriving show error. I am using an oracle VM and have installed the binaries for nix and have been running everything out of nix-shell.</p>
<p>Here is a better version of the error I've been receiving, this time on Week03's IsData.hs file, and I get the error at the 'Deriving Show' for MySillyRedeemer:<a href="https://i.sstatic.net/N60Hv.png" rel="noreferrer"><img src="https://i.sstatic.net/N60Hv.png" alt="enter image description here" /></a></p>
<p>Then when I add the 'Show' to the Playground.Contract the error morphs into this:
<a href="https://i.sstatic.net/A1WYw.png" rel="noreferrer"><img src="https://i.sstatic.net/A1WYw.png" alt="enter image description here" /></a></p>
<p>So at this point I am really not sure what to do, all of these errors I encounter on my localhost server. I've reinstalled the plutus git and nix as well and I can't seem to figure out why I have these errors. And the errors do all seem to be 'not in scope' related so maybe its a a case of me not having certain files downloaded?</p>
<p><strong>EDIT:</strong> Here is a copy of both the 'deriving show' error code:</p>
<pre><code>error:
    Not in scope: type constructor or class ‘Show’
    Perhaps you want to add ‘Show’ to one of these import lists:
      ‘Prelude’ (/run/user/1000/web-ghc-work-f4d3c6b7d9d2297b/Main.hs:32:1-54)
      ‘Playground.Contract’ (/run/user/1000/web-ghc-work-f4d3c6b7d9d2297b/Main.hs:29:1-103)
   |
38 |     } deriving Show
   |                ^^^^
</code></pre>
<p>As well as one of the error code I get when I add 'Show' to the import list via Playground.Contract:</p>
<pre><code>error:
    Not in scope: type constructor or class ‘Scripts.ScriptType’
    Module ‘Ledger.Typed.Scripts’ does not export ‘ScriptType’.
   |
59 | instance Scripts.ScriptType Vesting where
   |          ^^^^^^^^^^^^^^^^^^
</code></pre>

CC BY-SA 4.0
2021-06-22T20:11:01.260Z
+1 and welcome to the site, but it's typically better to copy and paste code and error messages into `code` blocks: This would help for blind people that are using screen readers, it would help with seachability, readability, reproducability, speed of loading on phones and on browsers with image blockers, etc.
Nike Dattani
CC BY-SA 4.0
2021-06-22T20:27:07.787Z
Thank you @NikeDattani I've gone back and added code blocks to make it more understandable. Luckily I found the reddit post where somebody is hosting a public plutus playground that I can work on, found here (https://www.reddit.com/r/CardanoDevelopers/comments/mno89m/plutus_community_playground/). Its not ideal but it is a partial solution to my problem.
Conor Devlin
<plutus><plutus-pioneer-program><plutus-playground>
Deriving Show Compilation Error on Plutus Playground
# Deriving Show Compilation Error on Plutus Playground

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

I seem to be getting a compilation error when I try to compile any of the example files on my local host configuration for the Plutus Playground. The error is pictured here: 
And basically it seems that no matter which example file I try and run I always end up getting a deriving show error. I am using an oracle VM and have installed the binaries for nix and have been running everything out of nix-shell.
Here is a better version of the error I've been receiving, this time on Week03's IsData.hs file, and I get the error at the 'Deriving Show' for MySillyRedeemer:
Then when I add the 'Show' to the Playground.Contract the error morphs into this:

So at this point I am really not sure what to do, all of these errors I encounter on my localhost server. I've reinstalled the plutus git and nix as well and I can't seem to figure out why I have these errors. And the errors do all seem to be 'not in scope' related so maybe its a a case of me not having certain files downloaded?
EDIT: Here is a copy of both the 'deriving show' error code:
error:
    Not in scope: type constructor or class ‘Show’
    Perhaps you want to add ‘Show’ to one of these import lists:
      ‘Prelude’ (/run/user/1000/web-ghc-work-f4d3c6b7d9d2297b/Main.hs:32:1-54)
      ‘Playground.Contract’ (/run/user/1000/web-ghc-work-f4d3c6b7d9d2297b/Main.hs:29:1-103)
   |
38 |     } deriving Show
   |                ^^^^

As well as one of the error code I get when I add 'Show' to the import list via Playground.Contract:
error:
    Not in scope: type constructor or class ‘Scripts.ScriptType’
    Module ‘Ledger.Typed.Scripts’ does not export ‘ScriptType’.
   |
59 | instance Scripts.ScriptType Vesting where
   |          ^^^^^^^^^^^^^^^^^^

**Tags:** plutus, plutus-pioneer-program, plutus-playground
> **Comments:**
> **username_1**: +1 and welcome to the site, but it's typically better to copy and paste code and error messages into `code` blocks: This would help for blind people that are using screen readers, it would help with seachability, readability, reproducability, speed of loading on phones and on browsers with image blockers, etc.  
> **username_0**: Thank you @NikeDattani I've gone back and added code blocks to make it more understandable. Luckily I found the reddit post where somebody is hosting a public plutus playground that I can work on, found here (https://www.reddit.com/r/CardanoDevelopers/comments/mno89m/plutus_community_playground/). Its not ideal but it is a partial solution to my problem.  

---

## 3 answers

### Answer by username_2 on 2021-06-22. Score: 3

I believe your issue is stemming from the fact that the plutus team is updating the plutus library relatively quickly, and since the code written in the plutus-pioneer-program is now a month or two old, it is outdated and will only compile on the older version of the plutus playground.

I suggest you keep using the publicly hosted playground and then eventually move over to cabal and the terminal.

> **Comments:**
> **username_0**: Yep, thats the plan for me going forward, it does the job but if I manage to find some workaround to it I'll post my solution, thanks!  

---

### Answer by username_3 on 2021-06-23. Score: 3

You can run the Playground locally in Week 3 if you checkout the Plutus branch referenced in the Week03 cabal.project. See the tag option below.
source-repository-package
  type: git
  location: https://github.com/input-output-hk/plutus.git
  subdir:
    freer-extras
    playground-common
    plutus-core
    plutus-contract
    plutus-ledger
    plutus-ledger-api
    plutus-tx
    plutus-tx-plugin
    prettyprinter-configurable
    quickcheck-dynamic
  tag: 3aa86304e9bfc425667051a8a94db73fcdc38878


---

### Answer by username_4 on 2021-06-25. Score: 0

These are exactly the same errors that I get when I try to compile the Week 3 code with the latest Plutus master, so there is nothing wrong with your setup.

I was migrating the code to work with the master branch, but there have been a lot of Plutus changes since the Week 3 code was written which involved a lot of head scratching trying to figure out what was what.

As other posters have mentioned, checking out the correct commit should fix this for you.


---

