Provide a way to set custom cache directory #72528
kirill-konshin
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
@kirill-konshin Have you tried taking a look at the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Link to the code that reproduces this issue
https://github.com/kirill-konshin/next-electron-rsc/tree/main/demo
To Reproduce
cd demo
yarn build
yarn open
Current vs. Expected behavior
Next.js is in standalone mode here, and is bundled using
electron-builder
.Since the
.next/standalone/demo/
is part offiles
, it becomes part of the ASAR.When the Electron runs as a build, Next.js emits following error:
So either ASAR is not writable at all (https://www.electronjs.org/docs/latest/tutorial/asar-archives#archives-are-read-only) the solution could be to provide alternative
cacheDir
outside of ASAR: https://github.com/vercel/next.js/blob/canary/packages/next/src/server/image-optimizer.ts#L372I tried opting cache path out of ASAR, did not work for a different reason: electron-userland/electron-builder#7264
Original issue: kirill-konshin/next-electron-rsc#3
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 Available memory (MB): 65536 Available CPU cores: 10 Binaries: Node: 23.0.0 npm: 10.9.0 Yarn: 4.5.1 pnpm: N/A Relevant Packages: next: 15.0.2 eslint-config-next: 15.0.2 react: 18.3.1 react-dom: 18.3.1 typescript: 5.6.3 Next.js Config: output: standalone
Which area(s) are affected? (Select all that apply)
Image (next/image)
Which stage(s) are affected? (Select all that apply)
Other (Deployed)
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions