Lisk-sdk: Quickstart guide project issue.

Created on 22 May 2021  路  3Comments  路  Source: LiskHQ/lisk-sdk

Summary

I was reading the docs and found the Quickstart guide https://lisk.com/documentation/lisk-sdk/quickstart.html. I followed the instructions.

const { Application, genesisBlockDevnet, configDevnet } = require('lisk-sdk'); 

const app = Application.defaultApplication(genesisBlockDevnet, configDevnet); 

app 
    .run()
    .then(() => app.logger.info('App started...'))
    .catch(error => {
        console.error('Faced error in application', error);
        process.exit(1);
    });

Expected behavior

Run the default application of LISK-SDK.

Actual behavior

16:21:08 INFO lisk-framework: Starting the app - devnet (module=lisk:app)
16:21:08 INFO lisk-framework: If you experience any type of error, please open an issue on Lisk GitHub: https://github.com/LiskHQ/lisk-sdk/issues (module=lisk:app)
16:21:08 INFO lisk-framework: Contribution guidelines can be found at Lisk-sdk: https://github.com/LiskHQ/lisk-sdk/blob/development/docs/CONTRIBUTING.md (module=lisk:app)
16:21:08 INFO lisk-framework: Booting the application with Lisk Framework(2.1.0) (module=lisk:app)
Faced error in application TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (679)
    at writeFile (fs.js:1385:5)
    at go$writeFile (/home/user/Desktop/removeme/lisk-hello/node_modules/graceful-fs/graceful-fs.js:139:14)
    at Object.writeFile (/home/user/Desktop/removeme/lisk-hello/node_modules/graceful-fs/graceful-fs.js:136:12)
    at /home/user/Desktop/removeme/lisk-hello/node_modules/universalify/index.js:10:14
    at new Promise (<anonymous>)
    at Object.writeFile (/home/user/Desktop/removeme/lisk-hello/node_modules/universalify/index.js:7:14)
    at Application._validatePidFile (/home/user/Desktop/removeme/lisk-hello/node_modules/lisk-framework/dist-node/application.js:334:18)
    at async Application.run (/home/user/Desktop/removeme/lisk-hello/node_modules/lisk-framework/dist-node/application.js:129:9) {
  code: 'ERR_INVALID_ARG_TYPE'
}
16:21:08 INFO lisk-framework: Application shutdown started (module=lisk:app)
{
 "errorCode": 1,
 "message": "process.exit"
} 

Steps to reproduce

Simply follow https://lisk.com/documentation/lisk-sdk/quickstart.html

Which version(s) does this affect? (Environment, OS, etc...)

  • (OS) Ubuntu 18.04.
  • nvm v0.35.2
  • node v14.7.0
    I also tried with pnpm v6.2.1
// package.json
{
  "name": "lisk-hello",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "lisk-sdk": "^5.1.0"
  }
}

Most helpful comment

I've tried it on node v12 and now it works.
Thanks!

All 3 comments

I have the same issue.
Somebody founds some workaround?

I think it's because of the node version. Could you try using node.js 12.x?

I've tried it on node v12 and now it works.
Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nazgolze picture Nazgolze  路  3Comments

ManuGowda picture ManuGowda  路  3Comments

slaweet picture slaweet  路  4Comments

karek314 picture karek314  路  3Comments

karmacoma picture karmacoma  路  3Comments