Resolves issue on npm run dev caused by Astro cache (node_modules/.astro/):
19:16:05 [@astrojs/cloudflare] There is no `.dev.vars` file in the root directory, if you have encrypted secrets or environmental variables you Cloudflare recommends to put them in this file
19:16:06 [ERROR] [UnhandledRejection] Astro detected an unhandled rejection. Here's the stack trace:
Error: EEXIST: file already exists, mkdir '/Users/.../code/voorhoede/head-start/node_modules/.astro/'
at mkdirSync (node:fs:1379:3)
at LocalPagesRuntime.getCF (file:///Users/.../code/voorhoede/head-start/node_modules/@astrojs/cloudflare/dist/utils/local-runtime.js:114:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async middleware (file:///Users/.../code/voorhoede/head-start/node_modules/@astrojs/cloudflare/dist/index.js:66:36)
Hint:
Make sure your promises all have an `await` or a `.catch()` handler.
Error reference:
https://docs.astro.build/en/reference/errors/unhandled-rejection/
Stack trace:
at mkdirSync (node:fs:1379:3)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[...] See full stack trace in the browser, or rerun with --verbose.
Changes
npm run dev
caused by Astro cache (node_modules/.astro/
):Associated issue
How to test
npm run dev
.Checklist
I have made updated relevant documentation files (in project README, docs/, etc)I have added a decision log entry if the change affects the architecture or changes a significant technologyI have notified a reviewer(minor change)