# Js-ipfs publish IPNS record error

**URL:** <https://discuss.ipfs.tech/t/js-ipfs-publish-ipns-record-error/15125>\
**Category:** Help\
**Tags:** js-ipfs, ipns\
**Created:** [September 6, 2022, 7:44am UTC](https://discuss.ipfs.tech/t/js-ipfs-publish-ipns-record-error/15125 "2022-09-06T07:44:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tknoch](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/tknoch/32/6906_2.png) [@tknoch](https://discuss.ipfs.tech/u/tknoch)\
**Post date:** [September 6, 2022, 7:44am UTC](https://discuss.ipfs.tech/t/js-ipfs-publish-ipns-record-error/15125/1 "2022-09-06T07:44:37Z")

</div>

I successfully ran a IPFS node on my nestjs API using js-ipfs (ipfs-core).  
When trying to publish a IPNS record, I get the following error:

```auto
Error: ipns record for f5uxa3ttf4acicabciqhcqrufyvadw2s7tyk2lp7tiaca737jtwpi6sjeiwzv4xqpsmwehi could not be stored in the routing - Error: Write failed
    at Object.dbWriteFailedError (/Users/tiagoknoch/source/nestjs-tutorial/mycv/node_modules/datastore-core/cjs/src/errors.js:20:16)
    at TieredDatastore.put (/Users/tiagoknoch/source/nestjs-tutorial/mycv/node_modules/datastore-core/cjs/src/tiered.js:34:20)
    at IpnsPublisher._publishEntry (/Users/tiagoknoch/source/nestjs-tutorial/mycv/node_modules/ipfs-core/cjs/src/ipns/publisher.js:85:19)
    at IpnsPublisher._putRecordToRouting (/Users/tiagoknoch/source/nestjs-tutorial/mycv/node_modules/ipfs-core/cjs/src/ipns/publisher.js:67:5)

```

Code sample:

```auto
  async test() {
    const ipfs = await create();
    const file = await ipfs.add({
      path: 'text.txt',
      content: new TextEncoder().encode(
        'Hello World ' + new Date().toISOString(),
      ),
    });
    const addr = `/ipfs/${file.cid.toString()}`;
    const res = await this.node.name.publish(addr);
    console.log(`https://gateway.ipfs.io/ipns/${res.name}`);
  }

```
