I have my project structure something like this
Now, I need to write a file from assets.js to a file in pdf folder.
That is what i am trying
var qrImgPath = '/lib/pdf/' +eod+'.png';
fs.writeFile(qrImgPath,body,'binary',function(err){
return next();
});
but i am getting following error
{ handle: 2,
type: 'error',
className: 'Error',
constructorFunction: { ref: 5 },
protoObject: { ref: 6 },
prototypeObject: { ref: 1 },
properties:
[ { name: 'stack',
attributes: 2,
propertyType: 3,
ref: 1 },
{ name: 'arguments',
attributes: 2,
propertyType: 1,
ref: 1 },
{ name: 'type',
attributes: 2,
propertyType: 1,
ref: 1 },
{ name: 'message',
attributes: 2,
propertyType: 1,
ref: 7 },
{ name: 'errno',
propertyType: 1,
ref: 8 },
{ name: 'code',
propertyType: 1,
ref: 9 },
{ name: 'path',
propertyType: 1,
ref: 10 } ],
text: 'Error: ENOENT, open \'/lib/pdf/b0551796a741aa885e641dbd895a233f.png\'' }
.
How can i achieve this?