How to read/write files in Nuxt server?
Hello everyone,
I encounter a problem with my project when switching to production (npm run build). In development (npm run dev), everything works perfectly, but in production, I get the following error:
Code :
How to read and write files (on the production) with Nuxt (knowing that I perform these actions in an API SERVER route)?
Thank you in advance and have a good evening.
1 Reply
Alexander Lichter
YouTube
Store files and K/Vs in Nuxt and Nitro - Powered by unstorage
💾 Reading and writing information is important for an application, be it for storage, caching or more. But especially with all the available runtimes and platform (think serverless, edge, ...) and storage options, it became more and more complex. Luckily, useStorage, powered by the unstorage package, can help us there! Let's see how!
---
Key po...