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);
});
Run the default application of LISK-SDK.
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"
}
Simply follow https://lisk.com/documentation/lisk-sdk/quickstart.html
// 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"
}
}
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!
Most helpful comment
I've tried it on node v12 and now it works.
Thanks!