Error `Cannot read properties of undefined (reading 'createJWS')`

From Lit:

"i keep hitting this error Cannot read properties of undefined (reading 'createJWS') . i’ve run though the Getting Started page a few times, including uninstalling and reinstalling all the packages but keep hitting the same thing.

it’s also happening on the previous build that was working about a month ago. i can see createJws in the did-jwt package in node modules but it doesn’t seem to be registering."

"Error is happening in the client:
composedb composite:create and merge both work as expected, but
composedb composite:deploy composites/merged-composite.json --ceramic-url=http://localhost:7007 throws the error. I’m using the packages listed in the Getting Started Notion doc, and here’s the daemon config

  "anchor": {},
  "http-api": {
    "cors-allowed-origins": [
    "admin-dids": [" ... "]
  "ipfs": {
    "mode": "bundled"
  "logger": {
    "log-level": 2,
    "log-to-files": false
  "metrics": {
    "metrics-exporter-enabled": false
  "network": {
    "name": "testnet-clay"
  "node": {},
  "state-store": {
    "mode": "fs",
    "local-directory": " ... /.ceramic/statestore/"
  "indexing": {
    "db": "sqlite:// ... /.ceramic/indexing.sqlite",
    "allow-queries-before-historical-sync": true

merged-composite .json

Encountered the same issue when using the CLI:

composedb composite:deploy tirl-composite.json --ceramic-url=http://localhost:7007

Here is my version data:

@composedb/cli/0.3.1 linux-x64 node-v16.18.1

Actually sorry in my case I forgot to set the DID_PRIVATE_KEY env variable :upside_down_face:

1 Like

thanks for checking back in. would it be helpful if we called that out more in the docs?

The most useful would be to improve the error message to be more helpful e.g.

Error Cannot read properties of undefined (reading ‘createJWS’)

DID_PRIVATE_KEY env variable not set or invalid. [Error Cannot read properties of undefined (reading ‘createJWS’)]

1 Like

Agree with that ^

The documentation already mentions it