# In Windows VS Code, getting "Couldn't match expected type 'Party' with actual type 'Party'"

**URL:** <https://forum.canton.network/t/in-windows-vs-code-getting-couldnt-match-expected-type-party-with-actual-type-party/6316>\
**Category:** App Development\
**Created:** [March 21, 2023, 5:43pm UTC](https://forum.canton.network/t/in-windows-vs-code-getting-couldnt-match-expected-type-party-with-actual-type-party/6316 "2023-03-21T17:43:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [March 21, 2023, 5:43pm UTC](https://forum.canton.network/t/in-windows-vs-code-getting-couldnt-match-expected-type-party-with-actual-type-party/6316/1 "2023-03-21T17:43:59Z")

</div>

I’m working with a colleague on a Daml project. On my Mac, the project opens without error in VS Code. On my colleague’s Windows machine, the VS Code editor complains about all Script `createCmd`s with squiggly underlines, with the following error:

```haskell
Couldn't match expected type 'Party'
            with actual type 'Party'
NB: 'Party' is defined in 'DA.Internal.LF'
    'Party' is defined in 'DA.Internal.LF'

```

The project builds without error on his command line with `daml build`.

Here are some things we have tried:

- Uninstall all but a single Daml SDK.
- Confirm the Daml Extension version matches the installed Daml SDK version.
- Uninstall and reinstall the Daml Extension with VS Code.
- Run `daml clean`.
- Re-clone the project into a new, empty folder.
- Reproduce the error on his machine with a new simple project. (We cannot.)

Here is the `daml.yaml`:

```haskell
sdk-version: 2.6.0
name: project-name-here
source: src/test/daml
version: 0.0.1
dependencies:
  - daml-prim
  - daml-stdlib
  - daml-script
build-options:
  - --include=src/main/daml
  - --include=src/fake/daml

```

**Any ideas for what else we can try?**

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [March 21, 2023, 6:01pm UTC](https://forum.canton.network/t/in-windows-vs-code-getting-couldnt-match-expected-type-party-with-actual-type-party/6316/2 "2023-03-21T18:01:02Z")

</div>

Can you make sure that you’re open vscode in the directory that contains the `daml.yaml` and not a parent or subdirectory?

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [March 21, 2023, 6:04pm UTC](https://forum.canton.network/t/in-windows-vs-code-getting-couldnt-match-expected-type-party-with-actual-type-party/6316/3 "2023-03-21T18:04:33Z")

</div>

Yes, we are opening the Daml project folder which contains the `daml.yaml` file. Good point!

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [March 21, 2023, 6:16pm UTC](https://forum.canton.network/t/in-windows-vs-code-getting-couldnt-match-expected-type-party-with-actual-type-party/6316/4 "2023-03-21T18:16:15Z")

</div>

Can you make sure to

1. enable debug logging in the vscode extension settings
2. then do `Control/Cmd-Shift-P` → Reload Window.
3. Go to View → Output and select `Daml Language Server` in the dropdown and share the output you see there?

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [March 21, 2023, 7:11pm UTC](https://forum.canton.network/t/in-windows-vs-code-getting-couldnt-match-expected-type-party-with-actual-type-party/6316/5 "2023-03-21T19:11:36Z")

</div>

> [@cocreature](#):
>
> 1. enable debug logging in the vscode extension settings
> 2. then do `Control/Cmd-Shift-P` → Reload Window.
> 3. Go to View → Output and select `Daml Language Server` in the dropdown and share the output you see there?

Thank you, @cocreature for taking a look. Here is the output:

> **Daml Language Server output**
>
> ```haskell
> 2023-03-21 18:57:17.10 [DEBUG] [LanguageServer ScenarioService]
> Starting scenario service...
> 
> 2023-03-21 18:57:25.29 [DEBUG] [LanguageServer ScenarioService]
> Scenario service backend running on port 56442
> 
> 2023-03-21 18:57:25.38 [DEBUG] [LanguageServer ScenarioService]
> SCENARIO SERVICE STDOUT: Server started.
> 
> 2023-03-21 18:57:26.58 [INFO] [LanguageServer]
> SDK version: 2.6.0
>  
> 2023-03-21 18:57:26.58 [DEBUG] [LanguageServer]
> Sending session ping
> 
> 2023-03-21 18:57:26.61 [INFO] [LanguageServer]
> Registering ide configuration: IdeConfiguration {workspaceFolders = fromList NormalizedUri 4231656397434184703 "file:///c:/project/daml"]}
> 
> 2023-03-21 18:57:26.68 [DEBUG] [LanguageServer]
> Set files of interest to: [NormalizedFilePath "c:/project/daml/src/fake/daml/CompanyName/FakeData/FakeEntities.daml"]
> 
> 2023-03-21 18:57:26.71 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:26.71 [INFO] [LanguageServer]
> Opened text document: file:///c%3A/project/daml/src/fake/daml/CompanyName/FakeData/FakeEntities.daml
> 
> 2023-03-21 18:57:28.13 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.01s)
> 
> 2023-03-21 18:57:28.13 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 1.43s, exception: AsyncCancelled)
> 
> 2023-03-21 18:57:28.15 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:28.15 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.02s, exception: AsyncCancelled)
> 
> 2023-03-21 18:57:29.48 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 1.33s, exception: AsyncCancelled)
> 
> 2023-03-21 18:57:29.57 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:29.71 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.10s)
> 
> 2023-03-21 18:57:30.04 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.04s, exception: AsyncCancelled)
> 
> 2023-03-21 18:57:31.33 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 1.30s, completed)
> 
> 2023-03-21 18:57:31.53 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:31.54 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.01s, completed)
> 
> 2023-03-21 18:57:31.78 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:31.78 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
> 
> 2023-03-21 18:57:31.78 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:31.79 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.01s, completed)
> 
> 2023-03-21 18:57:33.36 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:33.38 [INFO] [LanguageServer]
> CodeLens request for file: c:/project/daml/src/fake/daml/CompanyName/FakeData/FakeEntities.daml
> 
> 2023-03-21 18:57:33.38 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.01s, completed)
> 
> 2023-03-21 18:57:33.38 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:33.39 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.01s, completed)
> 
> 2023-03-21 18:57:33.90 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:33.92 [INFO] [LanguageServer]
> CodeLens request for file: c:/project/daml/src/fake/daml/CompanyName/FakeData/FakeEntities.daml
> 
> 2023-03-21 18:57:33.92 [DEBUG] [LanguageServer]
> Starting shakeRun (aborting the previous one took 0.00s)
> 
> 2023-03-21 18:57:33.92 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
> 
> 2023-03-21 18:57:33.93 [DEBUG] [LanguageServer]
> Finishing shakeRun (took 0.01s, completed)
> 
> ```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [March 22, 2023, 7:33am UTC](https://forum.canton.network/t/in-windows-vs-code-getting-couldnt-match-expected-type-party-with-actual-type-party/6316/6 "2023-03-22T07:33:45Z")

</div>

That looks fine to me, can you please run through these steps:

1. close vscode, make sure the process is completely dead and not just in the background (e.g. in the task manager)
2. run `daml clean`
3. double check that the `.daml` folder is gone, if it is not, delete it manually
4. Open vsode again in the folder where your daml.yaml is located.
