# Need help with getting started

**URL:** <https://forum.canton.network/t/need-help-with-getting-started/3347>\
**Category:** App Development\
**Tags:** daml\
**Created:** [October 21, 2021, 9:46am UTC](https://forum.canton.network/t/need-help-with-getting-started/3347 "2021-10-21T09:46:47Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShyamSuchakATP](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/shyamsuchakatp/32/2680_2.png) [@ShyamSuchakATP](https://forum.canton.network/u/ShyamSuchakATP)\
**Post date:** [October 21, 2021, 9:46am UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/1 "2021-10-21T09:46:47Z")

</div>

Hello DAML community,

My name is Shyam Suchak and I am interested to explore the space and learning more about coding with DAML.

As any newbie will do, I went to Daml documentation \> Getting started section and installed sdk + npm on my machine.

As per the guide [Getting Started with Daml — Daml SDK 1.17.1 documentation](https://docs.daml.com/getting-started/index.html) when I hit npm start, I am getting the below error. Can you please help me out to resolve the issue.

Error: error:0308010C:digital envelope routines::unsupported  
at new Hash (node:internal/crypto/hash:67:19)  
at Object.createHash (node:crypto:130:10)  
at module.exports (D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\util\createHash.js:135:53)  
at NormalModule.\_initBuildHash (D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\NormalModule.js:417:16)  
at handleParseError (D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\NormalModule.js:471:10)  
at D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\NormalModule.js:503:5  
at D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\NormalModule.js:358:12  
at D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\loader-runner\lib\LoaderRunner.js:373:3  
at iterateNormalLoaders (D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\loader-runner\lib\LoaderRunner.js:214:10)  
at iterateNormalLoaders (D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\loader-runner\lib\LoaderRunner.js:221:10)  
D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\react-scripts\scripts\start.js:19  
throw err;  
^

Error: error:0308010C:digital envelope routines::unsupported  
at new Hash (node:internal/crypto/hash:67:19)  
at Object.createHash (node:crypto:130:10)  
at module.exports (D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\util\createHash.js:135:53)  
at NormalModule.\_initBuildHash (D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\NormalModule.js:417:16)  
at D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\NormalModule.js:452:10  
at D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\webpack\lib\NormalModule.js:323:13  
at D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\loader-runner\lib\LoaderRunner.js:367:11  
at D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\loader-runner\lib\LoaderRunner.js:233:18  
at context.callback (D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\loader-runner\lib\LoaderRunner.js:111:13)  
at D:\SourceCode\GitHub\DAML\daml-first-project\create-daml-app\ui\node\_modules\babel-loader\lib\index.js:59:103 {  
opensslErrorStack: [‘error:03000086:digital envelope routines::initialization error’],  
library: ‘digital envelope routines’,  
reason: ‘unsupported’,  
code: ‘ERR\_OSSL\_EVP\_UNSUPPORTED’  
}

---

<div class="post-metadata">

**Author:** ![stefanobaghino-da](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stefanobaghino-da/32/7057_2.png) [@stefanobaghino-da](https://forum.canton.network/u/stefanobaghino-da)\
**Post date:** [October 21, 2021, 10:03am UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/2 "2021-10-21T10:03:04Z")

</div>

I’m not an expert here, but a quick search on the Internet seems to suggest that you might be using Node.js 17, which uses OpenSSL 3 by default, which seems to possibly be breaking things here and there ([nodejs 17: digital envelope routines::unsupported · Issue #14532 · webpack/webpack · GitHub](https://github.com/webpack/webpack/issues/14532)).

Can you try and see if running `NODE_OPTIONS=--openssl-legacy-provider npm start` works for you?

---

<div class="post-metadata">

**Author:** ![ShyamSuchakATP](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/shyamsuchakatp/32/2680_2.png) [@ShyamSuchakATP](https://forum.canton.network/u/ShyamSuchakATP)\
**Post date:** [October 21, 2021, 1:48pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/3 "2021-10-21T13:48:00Z")

</div>

> [@stefanobaghino-da](#):
>
> –openssl-legacy-provider

Thanks, Stefan your solution worked.

For windows

set NODE\_OPTIONS=–openssl-legacy-provider

npm start

---

<div class="post-metadata">

**Author:** ![ShyamSuchakATP](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/shyamsuchakatp/32/2680_2.png) [@ShyamSuchakATP](https://forum.canton.network/u/ShyamSuchakATP)\
**Post date:** [October 21, 2021, 2:35pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/4 "2021-10-21T14:35:10Z")

</div>

Now I am getting another error

Request with path /v1/fetch proxied from host localhost:3000 to host [http://localhost:7575](http://localhost:7575)  
[HPM] Error occurred while proxying request localhost:3000/v1/fetch to [http://localhost:7575/](http://localhost:7575/) [ECONNREFUSED] ([Errors | Node.js v17.0.1 Documentation](https://nodejs.org/api/errors.html#errors_common_system_errors))

`ECONNREFUSED` (Connection refused): No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host

How to triage this issue now, it seems like openssl incompatibility must be playing a part here.

Please help

---

<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:** [November 10, 2021, 1:24pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/5 "2021-11-10T13:24:33Z")

</div>

Hi @ShyamSuchakATP,

`ECONNREFUSED` usually means that there is no program listening to the given port. In this case, this may indicate that you have not started the JSON API server. In the case of the `create-daml-app` template, before you can run `npm start`, you need to have `daml start` running.

Otherwise, you’re essentially running your frontend server with no backend server, which does not work.

---

<div class="post-metadata">

**Author:** ![Ben\_M](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/ben_m/32/3080_2.png) [@Ben\_M](https://forum.canton.network/u/Ben_M)\
**Post date:** [January 10, 2022, 9:16pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/6 "2022-01-10T21:16:15Z")

</div>

Hi @ShyamSuchakATP

Here is an excellent set of learning materials, which might be helpful for you.

> [@Daml learning materials and resources](https://discuss.daml.com/t/daml-learning-materials-and-resources/1738):
>
> [Install Daml Connect](https://docs.daml.com/getting-started/installation.html): If you’re going to try Daml on your computer you’re going to need the toolkit. [An introduction to Daml](https://docs.daml.com/daml/intro/1_Token.html): Ready to get to developing your own Daml applications? Start with the chapters in [“An introduction to Daml”](https://docs.daml.com/daml/intro/1_Token.html) and also make sure to reference [“Good design patterns”](https://docs.daml.com/daml/patterns.html) which helps clear up how to structure Daml applications and interactions between parties. [daml.com/certification](https://daml.com/certification): Get certified in Daml! [youtube.com/DamlDriven](https://www.youtube.com/DamlDriven): Watch our developers code live, explain…

2 key steps are always:

- daml build
- daml start

If you can get any Daml app (.DAR) built and running without errors that is a great start.

Keep in touch 👍🏻

---

<div class="post-metadata">

**Author:** ![dzubarchuk](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dzubarchuk](https://forum.canton.network/u/dzubarchuk)\
**Post date:** [December 1, 2022, 10:20pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/7 "2022-12-01T22:20:02Z")

</div>

Hi, I was getting the same error as the one in the post. and did set NODE\_OPTIONS …  
However, now when I run “npm start” - I get the following error:  
C:\Program Files\nodejs\node.exe: -openssl-legacy-provider is not allowed in NODE\_OPTIONS

Here are my version specs:  
**daml version:** 2.4.0 (project SDK version from daml.yaml)  
**node -v:** v19.2.0  
**java -version:**  
openjdk version “17.0.5” 2022-10-18  
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)  
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

---

<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:** [December 1, 2022, 10:34pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/8 "2022-12-01T22:34:21Z")

</div>

You need to start the option with two dashes:

```haskell
--openssl-legacy-provider

```

not

```haskell
-openssl-legacy-provider

```

---

<div class="post-metadata">

**Author:** ![dzubarchuk](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dzubarchuk](https://forum.canton.network/u/dzubarchuk)\
**Post date:** [December 2, 2022, 3:26pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/10 "2022-12-02T15:26:44Z")

</div>

This worked! It launched the daml App. However, now I have a new issue:  
When I try to enter “alice” or “bob” to log in, I get a:  
**Failed to login as ‘alice’**  
**SyntaxError:Unexpected token ‘E’, “Error occu”… is not valid JSON**

Is it because I have a version 19 for the node.js or is it something else?

---

<div class="post-metadata">

**Author:** ![a\_putkov](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/a_putkov/32/2971_2.png) [@a\_putkov](https://forum.canton.network/u/a_putkov)\
**Post date:** [December 5, 2022, 10:52pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/11 "2022-12-05T22:52:59Z")

</div>

@dzubarchuk  
I don’t think this error is related to the version of Node you’re using. This error could indicate that your Node application cannot communicate with the HTTP JSON API server. E.g. it could be that the HTTP JSON API server, that allows your Node application to submit commands to the ledger, is not running. What Daml app are you launching and how are you launching it?

---

<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:** [December 6, 2022, 11:58am UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/12 "2022-12-06T11:58:20Z")

</div>

I believe this is indeed related to Node 19. Here is what I think is happening:

Node 19 (as well as the latest versions of Node 18, actually) now resolves `localhost` to `::1`, whereas the JSON API only binds to `127.0.0.1` (IPv6 v. IPv4). So the Node development server started by `npm start` tries to connect to `::1`, gets a “connection refused”, returns that to our Daml code (`Error occured when trying to connect: connection refused`), which is expecting JSON and thus fails to parse that as JSON on the first character as `E` is not valid there (for valid JSON it can only be one of `"`, `[`, `{`, `t`, `f`, `n`, or a digit).

If that is indeed your issue, the easiest fix is to replace all occurrences of `localhost` with `127.0.0.1` manually. There is one occurrence in `ui/package.json` and one in `ui/src/setupProxy.js`.

This [fix](https://github.com/digital-asset/daml/pull/15717/files) will be part of 2.5.0.

---

<div class="post-metadata">

**Author:** ![dzubarchuk](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dzubarchuk](https://forum.canton.network/u/dzubarchuk)\
**Post date:** [December 6, 2022, 6:52pm UTC](https://forum.canton.network/t/need-help-with-getting-started/3347/13 "2022-12-06T18:52:38Z")

</div>

Yea it was related to the node version. Thank you so much for clearing that up for me!
