Next.js Discord

Discord Forum

Using custom dir in nextjs config breaks caching

Unanswered
Chausie posted this in #help-forum
Open in Discord
ChausieOP
I use a custom setup with custom dir which I set in the NextServerOptions, everything works however the caching does not. I get this error:

<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: ENOENT: no such file or directory, lstat '/home/ivje/ah/packages/ah/ui/nextjs/.next/server'
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Resolving '../../../../../../../packages/ah/ui/nextjs/.next/server/app/page' in /home/ivje/ah/node_modules/.pnpm/next@14.1.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/server for build dependencies doesn't lead to expected result 
... more ...

0 Replies