Need help with getting started

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 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)
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’,

1 Like

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

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


Thanks, Stefan your solution worked.

For windows

set NODE_OPTIONS=–openssl-legacy-provider

npm start

Now I am getting another error

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

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

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.


Hi @ShyamSuchakATP

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

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 :+1:t2: