# No Daml.Script import?

**URL:** <https://forum.canton.network/t/no-daml-script-import/22>\
**Category:** App Development\
**Tags:** daml, script, docs\
**Created:** [March 30, 2020, 1:51pm UTC](https://forum.canton.network/t/no-daml-script-import/22 "2020-03-30T13:51:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthony](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/anthony/32/419_2.png) [@anthony](https://forum.canton.network/u/anthony)\
**Post date:** [March 30, 2020, 1:51pm UTC](https://forum.canton.network/t/no-daml-script-import/22/1 "2020-03-30T13:51:11Z")

</div>

I’m following along with the DAML Script docs but getting an error on `import Daml.Script`

```nohighlight
Could not find module ‘Daml.Script’
It is not a module in the current program, or in any known package.

```

My `daml.yaml` looks like this:

```nohighlight
sdk-version: 0.13.55
name: szabo_car_contract
version: 1.0.0
source: daml/Main.daml
scenario: Main:mainScenario
parties:
- Alice
- Bob
exposed-modules:
- Main
dependencies:
- daml-prim
- daml-stdlib
- daml-script

```

---

<div class="post-metadata">

**Author:** ![anthony](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/anthony/32/419_2.png) [@anthony](https://forum.canton.network/u/anthony)\
**Post date:** [March 30, 2020, 2:00pm UTC](https://forum.canton.network/t/no-daml-script-import/22/2 "2020-03-30T14:00:40Z")

</div>

Restarting DAML Studio (ie. exit Visual Studio Code, run `daml studio` again) fixed the import issue.

---

<div class="post-metadata">

**Author:** ![bernhard](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bernhard/32/356_2.png) [@bernhard](https://forum.canton.network/u/bernhard)\
**Post date:** [April 8, 2020, 7:47am UTC](https://forum.canton.network/t/no-daml-script-import/22/3 "2020-04-08T07:47:03Z")

</div>

The other possible cause is that DAML Studio (/VS Code) has to be opened on the directory containing the `daml.yaml` file. For example, you have a `foo/bar/daml.yaml` project root, and open VS Code in `foo`, it will fail to resolve the DAML Script library. This is a known issue: [#5455](https://github.com/digital-asset/daml/issues/5455)

---

<div class="post-metadata">

**Author:** ![quidagis](https://avatars.discourse-cdn.com/v4/letter/q/dbc845/32.png) [@quidagis](https://forum.canton.network/u/quidagis)\
**Post date:** [June 9, 2021, 12:10am UTC](https://forum.canton.network/t/no-daml-script-import/22/4 "2021-06-09T00:10:06Z")

</div>

As @bernhard states, you need to open the Project directory containing the daml.yaml else VS Code outputs an error. Following his advice, error gone 👍🏻

---

<div class="post-metadata">

**Author:** ![Gary\_Verhaegen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gary_verhaegen/32/81_2.png) [@Gary\_Verhaegen](https://forum.canton.network/u/Gary_Verhaegen)\
**Post date:** [June 9, 2021, 7:57am UTC](https://forum.canton.network/t/no-daml-script-import/22/5 "2021-06-09T07:57:48Z")

</div>

Could you clarify what exactly the issue is? Maybe provide reproducing steps?

```bash
daml new t
cd t
daml studio

```

yields a working `import Daml.Script` for me.

---

<div class="post-metadata">

**Author:** ![Arin\_Aggarwal](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/arin_aggarwal/32/2259_2.png) [@Arin\_Aggarwal](https://forum.canton.network/u/Arin_Aggarwal)\
**Post date:** [July 26, 2021, 2:51pm UTC](https://forum.canton.network/t/no-daml-script-import/22/6 "2021-07-26T14:51:44Z")

</div>

Ensure that when creating the new DAML project that you cd into it before “Daml studio”
