#Astro and Playwright `ENONENT '.../.astro/data-store.json'`

2 messages · Page 1 of 1 (latest)

chilly basin
#

Hi all,

A very, very obscure problem here. I'm trying to use Playwright and create some e2e tests for my Astro project.

I'm using @inox-tools/astro-tests to start up a dev server before each test. But the tests are quite flaky, but each time fail because of an error:

Error: ENOENT: no such file or directory, rename '...\.astro\data-store.json.tmp' -> '...\.astro\data-store.json'

I believe it's coming from:

MutableDataStore.#writeFileAtomic (...\node_modules\.pnpm\[email protected]_@types+node@24_1c5dff840ae835d2db5e361cac3d13dd\node_modules\astro\dist\content\mutable-data-store.js:214:7)

I don't know if there's a better way of testing with Playwright, but I'm just trying to start up a new instance of the same project each time but yeah seems to have this weird error.

#

This is the whole stack trace:


Error: ENOENT: no such file or directory, rename '...\.astro\data-store.json.tmp' -> '...\.astro\data-store.json'
        at MutableDataStore.#writeFileAtomic (...\node_modules\.pnpm\[email protected]_@types+node@24_1c5dff840ae835d2db5e361cac3d13dd\node_modules\astro\dist\content\mutable-data-store.js:214:7)
        at MutableDataStore.writeToDisk (...\node_modules\.pnpm\[email protected]_@types+node@24_1c5dff840ae835d2db5e361cac3d13dd\node_modules\astro\dist\content\mutable-data-store.js:335:7)
        at MutableDataStore.#saveToDiskNow (...\node_modules\.pnpm\[email protected]_@types+node@24_1c5dff840ae835d2db5e361cac3d13dd\node_modules\astro\dist\content\mutable-data-store.js:173:7)
        at MutableDataStore.waitUntilSaveComplete (...\node_modules\.pnpm\[email protected]_@types+node@24_1c5dff840ae835d2db5e361cac3d13dd\node_modules\astro\dist\content\mutable-data-store.js:320:5)
        at ContentLayer.#doSync (...\node_modules\.pnpm\[email protected]_@types+node@24_1c5dff840ae835d2db5e361cac3d13dd\node_modules\astro\dist\content\content-layer.js:242:5)
        at ...\node_modules\.pnpm\[email protected]\node_modules\p-queue\dist\index.js:230:36