I'm using chartjsimage to convert charts into image and store them locally using the function .toFile. It works perfect in my local machine, but when i deploy it to azure web app, i get the following error.
{ Error: ENOENT: no such file or directory, open
'D:\home\site\wwwroot\public\images\image1.png'at
Object.openSync (fs.js:439:3)at Object.writeFileSync (fs.js:1190:35)
at ChartJsImage.toFile (D:\home\site\wwwroot\node_modules\chartjs-to-image\index.js:136:8)at
process._tickCallback (internal/process/next_tick.js:68:7)errno: -4058,syscall: 'open',code:
'ENOENT',path:'D:\\home\\site\\wwwroot\\public\\images\\image1.png' }
I thought that maybe i don't have access to local file system in Azure web app, but when i checked this link i found that it is actually possible to manipulate files inside D:\home
--UPDATE-- I tried to create the file from the terminal, and run with the same code again, i got the following error.
{
"errno": -4048,
"syscall": "write",
"code": "EPERM"
}
I think it's permession problem