Skip to content

maxmalysh/nitro-fs-lite-enotdir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reproduction: cannot cache both /foo and /foo/bar with fs-lite

It's not possible to cache both /foo and /foo/bar when using fs or fs-lite as the storage driver:

// nitro.config.ts (or nitro section of nuxt.config.ts)
storage: {
  cache: { driver: "fs-lite", base: ".cache/nitro" },
}

Steps to reproduce

npm install
npx nitro dev
  1. Open http://localhost:3000 — index page with links
  2. Click /foo — payload is cached, creates file at .cache/nitro/foo
  3. Click /foo/bar — tries to cache payload, needs .cache/nitro/foo to be a directoryENOTDIR

Expected

Both routes cache their payloads successfully.

Actual

Visiting /foo/bar after /foo crashes with:

ENOTDIR: not a directory, open '.cache/nitro/foo/bar'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors