I am trying to mount a volume to my app that way it can save a screenshot for debugging purposes
I don't know what path I should set the screenshots to save to, or what path to mount the volume at. I'm not very experienced with volumes and would appreciate some help
Solution:Jump to solution
if your app is built via nixpacks then your app's work directory will be
/app
if you're storing your images in a folder named images
in your app's root directory then you'll want to mount the volume to /app/images
...8 Replies
Project ID:
N/A
n/a
I tried mounting it to /data and saving the screenshot to /data/error.png but now I'm getting this weird error
![No description](https://cdn.answeroverflow.com/1266159249147559949/image.png)
Solution
if your app is built via nixpacks then your app's work directory will be
/app
if you're storing your images in a folder named images
in your app's root directory then you'll want to mount the volume to /app/images
alr let me try
I'm getting this really weird error that I don't get locally. Im not even sure where its coming from because the print statements at the beginning of the app havent even been logged.
![No description](https://cdn.answeroverflow.com/1266161542383140946/image.png)
these errors go away completely when i remove the volume
I even removed any references to the volume's filepath. As soon as I attach the volume, it starts crashing.
since it was unhandled error, try using .catch(console.error) to log the error and knows what's going on