I’m trying to help local school build their site and they have some data stored in Google Blogger. So I want to scrape that data and store it locally to generate those pages. But when I want to access that JSON file, it fails because it doesn’t find that file. Is there maybe some different path?
To store the data i use
, JSON.stringify(all));. And to access it then in getStaticProps I use
const filePath = path.join(process.cwd(), data/all.json
);. Locally it works, but on Netlify fails due to
Error: ENOENT: no such file or directory, open './data/all.json'. Any help would be really appreciated! Thanks!