const QRCode = require('qrcode'); const path = require('path'); QRCode.toFile(path.join(__dirname, 'qrcode.png'), 'put your data here', (err)=>{ if (err) throw err; });