# Not able to create an Instance of IPFS in nodejs

**URL:** <https://discuss.ipfs.tech/t/not-able-to-create-an-instance-of-ipfs-in-nodejs/5279>\
**Category:** Help\
**Tags:** js-ipfs, go-ipfs, ipfs-call\
**Created:** [April 23, 2019, 9:13am UTC](https://discuss.ipfs.tech/t/not-able-to-create-an-instance-of-ipfs-in-nodejs/5279 "2019-04-23T09:13:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mymails1283](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@mymails1283](https://discuss.ipfs.tech/u/mymails1283)\
**Post date:** [April 23, 2019, 9:13am UTC](https://discuss.ipfs.tech/t/not-able-to-create-an-instance-of-ipfs-in-nodejs/5279/1 "2019-04-23T09:13:14Z")

</div>

Hello,

I am new learner to IPFS so I have already installed IPFS. in my sample project I am trying to create an instance of ipfs in nodejs but not able to work.

below is my code where I am stucking

const IPFS = require(‘ipfs’)

const node = new IPFS()

node.on(‘ready’, async () =\> {  
const version = await node.version()

console.log(‘Version:’, version.version)

const filesAdded = await node.add({  
path: ‘hello.txt’,  
content: Buffer.from(‘Hello World 101’)  
})

console.log(‘Added file:’, filesAdded[0].path, filesAdded[0].hash)

const fileBuffer = await node.cat(filesAdded[0].hash)

console.log(‘Added file contents:’, fileBuffer.toString())  
})

After executing this code in nodejs. I am getting an error : Error: Cannot find module ‘ipfs’. Please provide me some assistance.

Regards  
Nishant
