Skip to content

node_modules are 2 times bigger than expected when installing Prisma Client and Prisma CLI on Windows #22574

Closed

Description

@Jolg42

Bug description

When installing Prisma CLI & Prisma Client on Windows, the size of the project is bigger than on Linux or macOS.
On macOS, the size of the project, would be about ~59MB.
On Windows the size of the project is more than double, at ~130MB

After looking at the files, see below, it turns out it's because of 2 .cache directory that are 35MB each, so in total, 70MB are added to the node_modules.

  • C:\Users\24\test\node_modules\.cache
  • C:\Users\24\test\node_modules\@prisma\engines\node_modules\.cache

The .cache directory is expected to be at C:\Users\24\test\node_modules\.cache only based on the current download logic.
The duplicate .cache directory is unexpected.

I would recommend having a look at our download logic and move the .cache directory out of node_modules, after that we would have a similar size for a project on all OS.

See output from `dir /s` where we can see that the project size is about 130MB after `npm i` of Prisma CLI and Prisma Client ``` C:\Users\24\test>dir /s Volume in drive C has no label. Volume Serial Number is 4C2A-BF71

Directory of C:\Users\24\test

01/05/2024 12:22 AM

.
01/04/2024 06:10 PM ..
01/05/2024 12:22 AM node_modules
01/05/2024 12:22 AM 3,484 package-lock.json
01/04/2024 06:13 PM 114 package.json
2 File(s) 3,598 bytes

Directory of C:\Users\24\test\node_modules

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM .bin
01/05/2024 12:22 AM .cache
01/05/2024 12:22 AM 3,331 .package-lock.json
01/05/2024 12:22 AM .prisma
01/05/2024 12:22 AM @prisma
01/05/2024 12:22 AM prisma
1 File(s) 3,331 bytes

Directory of C:\Users\24\test\node_modules.bin

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 391 prisma
01/05/2024 12:22 AM 326 prisma.cmd
01/05/2024 12:22 AM 809 prisma.ps1
3 File(s) 1,526 bytes

Directory of C:\Users\24\test\node_modules.cache

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM prisma
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules.cache\prisma

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM master
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules.cache\prisma\master

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules.cache\prisma\master\0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM windows
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules.cache\prisma\master\0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5\windows

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 18,369,024 libquery-engine
01/05/2024 12:22 AM 64 libquery-engine.gz.sha256
01/05/2024 12:22 AM 64 libquery-engine.sha256
01/05/2024 12:22 AM 16,502,272 schema-engine
01/05/2024 12:22 AM 64 schema-engine.gz.sha256
01/05/2024 12:22 AM 64 schema-engine.sha256
6 File(s) 34,871,552 bytes

Directory of C:\Users\24\test\node_modules.prisma

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM client
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules.prisma\client

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM deno
01/05/2024 12:22 AM 3,989 edge.d.ts
01/05/2024 12:22 AM 322 edge.js
01/05/2024 12:22 AM 321 index-browser.js
01/05/2024 12:22 AM 3,989 index.d.ts
01/05/2024 12:22 AM 2,189 index.js
5 File(s) 10,810 bytes

Directory of C:\Users\24\test\node_modules.prisma\client\deno

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 314 edge.ts
1 File(s) 314 bytes

Directory of C:\Users\24\test\node_modules@prisma

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM client
01/05/2024 12:22 AM debug
01/05/2024 12:22 AM engines
01/05/2024 12:22 AM engines-version
01/05/2024 12:22 AM fetch-engine
01/05/2024 12:22 AM get-platform
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules@prisma\client

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 31 edge.d.ts
01/05/2024 12:22 AM 58 edge.js
01/05/2024 12:22 AM 40 extension.d.ts
01/05/2024 12:22 AM 62 extension.js
01/05/2024 12:22 AM generator-build
01/05/2024 12:22 AM 80 index-browser.js
01/05/2024 12:22 AM 31 index.d.ts
01/05/2024 12:22 AM 59 index.js
01/05/2024 12:22 AM 11,357 LICENSE
01/05/2024 12:22 AM 5,589 package.json
01/05/2024 12:22 AM 2,645 README.md
01/05/2024 12:22 AM runtime
01/05/2024 12:22 AM scripts
10 File(s) 19,952 bytes

Directory of C:\Users\24\test\node_modules@prisma\client\generator-build

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 687,260 index.js
1 File(s) 687,260 bytes

Directory of C:\Users\24\test\node_modules@prisma\client\runtime

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 26 binary.d.ts
01/05/2024 12:22 AM 642,729 binary.js
01/05/2024 12:22 AM 241,429 edge-esm.js
01/05/2024 12:22 AM 241,650 edge.js
01/05/2024 12:22 AM 12,249 index-browser.d.ts
01/05/2024 12:22 AM 34,302 index-browser.js
01/05/2024 12:22 AM 102,531 library.d.ts
01/05/2024 12:22 AM 200,658 library.js
01/05/2024 12:22 AM 4,259,130 query-engine.wasm
9 File(s) 5,734,704 bytes

Directory of C:\Users\24\test\node_modules@prisma\client\scripts

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 5,732 colors.js
01/05/2024 12:22 AM 314 default-deno-edge.ts
01/05/2024 12:22 AM 322 default-edge.js
01/05/2024 12:22 AM 321 default-index-browser.js
01/05/2024 12:22 AM 3,989 default-index.d.ts
01/05/2024 12:22 AM 2,189 default-index.js
01/05/2024 12:22 AM 354 get-packed-client.js
01/05/2024 12:22 AM 304 postinstall.d.ts
01/05/2024 12:22 AM 13,544 postinstall.js
9 File(s) 27,069 bytes

Directory of C:\Users\24\test\node_modules@prisma\debug

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM dist
01/05/2024 12:22 AM 11,357 LICENSE
01/05/2024 12:22 AM 997 package.json
01/05/2024 12:22 AM 946 README.md
3 File(s) 13,300 bytes

Directory of C:\Users\24\test\node_modules@prisma\debug\dist

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 2,715 chunk-VBXJIVYU.js
01/05/2024 12:22 AM 1,083 index.d.ts
01/05/2024 12:22 AM 24,102 index.js
01/05/2024 12:22 AM 522 types.d.ts
01/05/2024 12:22 AM 14 types.js
01/05/2024 12:22 AM 123 util.d.ts
01/05/2024 12:22 AM 2,316 util.js
7 File(s) 30,875 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM dist
01/05/2024 12:22 AM 11,357 LICENSE
01/05/2024 12:22 AM node_modules
01/05/2024 12:22 AM 1,124 package.json
01/05/2024 12:22 AM 18,369,024 query_engine-windows.dll.node
01/05/2024 12:22 AM 740 README.md
01/05/2024 12:22 AM 16,502,272 schema-engine-windows.exe
01/05/2024 12:22 AM scripts
5 File(s) 34,884,517 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\dist

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 592 index.d.ts
01/05/2024 12:22 AM 5,622 index.js
01/05/2024 12:22 AM scripts
2 File(s) 6,214 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\dist\scripts

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 11 localinstall.d.ts
01/05/2024 12:22 AM 68,490 localinstall.js
01/05/2024 12:22 AM 11 postinstall.d.ts
01/05/2024 12:22 AM 5,951 postinstall.js
4 File(s) 74,463 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\node_modules

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM .cache
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\node_modules.cache

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM prisma
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\node_modules.cache\prisma

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM master
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\node_modules.cache\prisma\master

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\node_modules.cache\prisma\master\0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM windows
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\node_modules.cache\prisma\master\0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5\windows

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 18,369,024 libquery-engine
01/05/2024 12:22 AM 64 libquery-engine.gz.sha256
01/05/2024 12:22 AM 64 libquery-engine.sha256
01/05/2024 12:22 AM 16,502,272 schema-engine
01/05/2024 12:22 AM 64 schema-engine.gz.sha256
01/05/2024 12:22 AM 64 schema-engine.sha256
6 File(s) 34,871,552 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines\scripts

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 1,111 postinstall.js
1 File(s) 1,111 bytes

Directory of C:\Users\24\test\node_modules@prisma\engines-version

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 45 index.d.ts
01/05/2024 12:22 AM 217 index.js
01/05/2024 12:22 AM 11,357 LICENSE
01/05/2024 12:22 AM 634 package.json
01/05/2024 12:22 AM 435 README.md
5 File(s) 12,688 bytes

Directory of C:\Users\24\test\node_modules@prisma\fetch-engine

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM dist
01/05/2024 12:22 AM 11,357 LICENSE
01/05/2024 12:22 AM 1,606 package.json
01/05/2024 12:22 AM 598 README.md
3 File(s) 13,561 bytes

Directory of C:\Users\24\test\node_modules@prisma\fetch-engine\dist

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 160 BinaryType.d.ts
01/05/2024 12:22 AM 1,087 BinaryType.js
01/05/2024 12:22 AM 56 chmodPlusX.d.ts
01/05/2024 12:22 AM 1,087 chmodPlusX.js
01/05/2024 12:22 AM 80,964 chunk-AXNJ4AIJ.js
01/05/2024 12:22 AM 3,146 chunk-BXUPHLWW.js
01/05/2024 12:22 AM 2,009 chunk-CWGQAQ3T.js
01/05/2024 12:22 AM 1,192,705 chunk-FDMUWNGX.js
01/05/2024 12:22 AM 137,797 chunk-JLJWRMAC.js
01/05/2024 12:22 AM 89,416 chunk-PQIJMNJM.js
01/05/2024 12:22 AM 6,221 chunk-Q7UG36US.js
01/05/2024 12:22 AM 1,892 chunk-QVKNF2OV.js
01/05/2024 12:22 AM 80,964 chunk-R5CC4Z24.js
01/05/2024 12:22 AM 2,715 chunk-VBXJIVYU.js
01/05/2024 12:22 AM 47,956 chunk-VWQSWYHC.js
01/05/2024 12:22 AM 1,219 chunk-X37PZICB.js
01/05/2024 12:22 AM 5,322 chunk-XN5OP4F2.js
01/05/2024 12:22 AM 65 cleanupCache.d.ts
01/05/2024 12:22 AM 1,277 cleanupCache.js
01/05/2024 12:22 AM 1,063 download.d.ts
01/05/2024 12:22 AM 1,967 download.js
01/05/2024 12:22 AM 252 downloadZip.d.ts
01/05/2024 12:22 AM 1,332 downloadZip.js
01/05/2024 12:22 AM 499 env.d.ts
01/05/2024 12:22 AM 1,352 env.js
01/05/2024 12:22 AM 68 getHash.d.ts
01/05/2024 12:22 AM 1,072 getHash.js
01/05/2024 12:22 AM 218 getProxyAgent.d.ts
01/05/2024 12:22 AM 1,102 getProxyAgent.js
01/05/2024 12:22 AM 184 index.d.ts
01/05/2024 12:22 AM 2,465 index.js
01/05/2024 12:22 AM 86 log.d.ts
01/05/2024 12:22 AM 1,058 log.js
01/05/2024 12:22 AM 546 utils.d.ts
01/05/2024 12:22 AM 1,320 utils.js
35 File(s) 1,670,642 bytes

Directory of C:\Users\24\test\node_modules@prisma\get-platform

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM dist
01/05/2024 12:22 AM 11,357 LICENSE
01/05/2024 12:22 AM 1,310 package.json
01/05/2024 12:22 AM 665 README.md
3 File(s) 13,332 bytes

Directory of C:\Users\24\test\node_modules@prisma\get-platform\dist

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 150 assertNodeAPISupported.d.ts
01/05/2024 12:22 AM 1,147 assertNodeAPISupported.js
01/05/2024 12:22 AM 14 chunk-6HZWON4S.js
01/05/2024 12:22 AM 2,277 chunk-ATMXZBUA.js
01/05/2024 12:22 AM 1,928 chunk-FMZMOYZE.js
01/05/2024 12:22 AM 1,526 chunk-L4VWERKP.js
01/05/2024 12:22 AM 514,793 chunk-LVABMATQ.js
01/05/2024 12:22 AM 13,045 chunk-NRBYW3FO.js
01/05/2024 12:22 AM 2,224 chunk-O5EOXX3N.js
01/05/2024 12:22 AM 22,349 chunk-SD2UGOOM.js
01/05/2024 12:22 AM 3,148 chunk-UPBZT3NW.js
01/05/2024 12:22 AM 1,396 chunk-XC47443Z.js
01/05/2024 12:22 AM 2,363 chunk-XFO73BBC.js
01/05/2024 12:22 AM 340 getNodeAPIName.d.ts
01/05/2024 12:22 AM 1,107 getNodeAPIName.js
01/05/2024 12:22 AM 4,847 getPlatform.d.ts
01/05/2024 12:22 AM 2,002 getPlatform.js
01/05/2024 12:22 AM 355 index.d.ts
01/05/2024 12:22 AM 2,134 index.js
01/05/2024 12:22 AM 48 link.d.ts
01/05/2024 12:22 AM 1,117 link.js
01/05/2024 12:22 AM 236 logger.d.ts
01/05/2024 12:22 AM 1,251 logger.js
01/05/2024 12:22 AM 687 platforms.d.ts
01/05/2024 12:22 AM 1,127 platforms.js
01/05/2024 12:22 AM test-utils
25 File(s) 581,611 bytes

Directory of C:\Users\24\test\node_modules@prisma\get-platform\dist\test-utils

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 85 index.d.ts
01/05/2024 12:22 AM 1,292 index.js
01/05/2024 12:22 AM 5,959 jestContext.d.ts
01/05/2024 12:22 AM 1,234 jestContext.js
01/05/2024 12:22 AM 8,567 jestSnapshotSerializer.js
01/05/2024 12:22 AM 338 platformRegex.d.ts
01/05/2024 12:22 AM 1,214 platformRegex.js
7 File(s) 18,689 bytes

Directory of C:\Users\24\test\node_modules\prisma

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM build
01/05/2024 12:22 AM 11,357 LICENSE
01/05/2024 12:22 AM 3,333 package.json
01/05/2024 12:22 AM preinstall
01/05/2024 12:22 AM prisma-client
01/05/2024 12:22 AM 5,171 README.md
01/05/2024 12:22 AM scripts
3 File(s) 19,861 bytes

Directory of C:\Users\24\test\node_modules\prisma\build

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 640,073 child.js
01/05/2024 12:22 AM 2,861,315 index.js
01/05/2024 12:22 AM 2,759,216 prisma_schema_build_bg.wasm
01/05/2024 12:22 AM public
01/05/2024 12:22 AM 25,763 xdg-open
4 File(s) 6,286,367 bytes

Directory of C:\Users\24\test\node_modules\prisma\build\public

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM assets
01/05/2024 12:22 AM 627 favicon.svg
01/05/2024 12:22 AM http
01/05/2024 12:22 AM 594,165 icon-1024.png
01/05/2024 12:22 AM 289,927 index.css
01/05/2024 12:22 AM pages
3 File(s) 884,719 bytes

Directory of C:\Users\24\test\node_modules\prisma\build\public\assets

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 510 alert.60ea9f84.svg
01/05/2024 12:22 AM 207 array.1a36c222.svg
01/05/2024 12:22 AM 430 boolean.9188b434.svg
01/05/2024 12:22 AM 136 chevron-down.24f76e3c.svg
01/05/2024 12:22 AM 823 cross.c2610cf5.svg
01/05/2024 12:22 AM 329 datetime.a3bf710a.svg
01/05/2024 12:22 AM 945 download.8d34b65a.svg
01/05/2024 12:22 AM 195 ellipsis.a8c5a34a.svg
01/05/2024 12:22 AM 309 enum.7ec0b64c.svg
01/05/2024 12:22 AM 606 folder.d77b8eaf.svg
01/05/2024 12:22 AM 286 hamburger.5fdadeac.svg
01/05/2024 12:22 AM 282,914 index.js
01/05/2024 12:22 AM 121,716 inter-all-400-normal.4c1f8a0d.woff
01/05/2024 12:22 AM 131,632 inter-all-600-normal.d0a7c8a9.woff
01/05/2024 12:22 AM 6,500 inter-cyrillic-400-normal.ac97a49e.woff2
01/05/2024 12:22 AM 6,928 inter-cyrillic-600-normal.2c917f10.woff2
01/05/2024 12:22 AM 9,748 inter-cyrillic-ext-400-normal.f21a6a97.woff2
01/05/2024 12:22 AM 10,660 inter-cyrillic-ext-600-normal.bb31f197.woff2
01/05/2024 12:22 AM 8,288 inter-greek-400-normal.e9163df8.woff2
01/05/2024 12:22 AM 8,888 inter-greek-600-normal.e644d70f.woff2
01/05/2024 12:22 AM 4,992 inter-greek-ext-400-normal.43addcc8.woff2
01/05/2024 12:22 AM 5,328 inter-greek-ext-600-normal.7f437016.woff2
01/05/2024 12:22 AM 17,156 inter-latin-400-normal.27ae72da.woff2
01/05/2024 12:22 AM 18,096 inter-latin-600-normal.87d718a2.woff2
01/05/2024 12:22 AM 22,192 inter-latin-ext-400-normal.5b02c69a.woff2
01/05/2024 12:22 AM 24,168 inter-latin-ext-600-normal.88feb9e4.woff2
01/05/2024 12:22 AM 4,208 inter-vietnamese-600-normal.8185dacd.woff2
01/05/2024 12:22 AM 49,960 jetbrains-mono-all-400-normal.f86807b7.woff
01/05/2024 12:22 AM 4,676 jetbrains-mono-cyrillic-400-normal.1ae57fe2.woff2
01/05/2024 12:22 AM 19,188 jetbrains-mono-latin-400-normal.80a5dc9e.woff2
01/05/2024 12:22 AM 5,664 jetbrains-mono-latin-ext-400-normal.6315c53c.woff2
01/05/2024 12:22 AM 13,047 logotype.a960b169.svg
01/05/2024 12:22 AM 1,139 number.85ddf96b.svg
01/05/2024 12:22 AM 1,022 object.0ba944a6.svg
01/05/2024 12:22 AM 311 play.8811691e.svg
01/05/2024 12:22 AM 437 plus.8fbf7ad3.svg
01/05/2024 12:22 AM 557 refresh.d5448ccc.svg
01/05/2024 12:22 AM 363 search.2ed766ce.svg
01/05/2024 12:22 AM 21,112 settings.5ad25af2.svg
01/05/2024 12:22 AM 330 string.ea615a24.svg
01/05/2024 12:22 AM 152 tick-indeterminate.aec8a44d.svg
01/05/2024 12:22 AM 481 tick.8cbb6a93.svg
01/05/2024 12:22 AM 1,241,259 vendor.js
43 File(s) 2,047,888 bytes

Directory of C:\Users\24\test\node_modules\prisma\build\public\http

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 138 databrowser.js
01/05/2024 12:22 AM 133 splash.js
2 File(s) 271 bytes

Directory of C:\Users\24\test\node_modules\prisma\build\public\pages

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM http
0 File(s) 0 bytes

Directory of C:\Users\24\test\node_modules\prisma\build\public\pages\http

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 572 databrowser.html
01/05/2024 12:22 AM 567 splash.html
2 File(s) 1,139 bytes

Directory of C:\Users\24\test\node_modules\prisma\preinstall

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 31,826 index.js
1 File(s) 31,826 bytes

Directory of C:\Users\24\test\node_modules\prisma\prisma-client

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 31 edge.d.ts
01/05/2024 12:22 AM 58 edge.js
01/05/2024 12:22 AM 40 extension.d.ts
01/05/2024 12:22 AM 62 extension.js
01/05/2024 12:22 AM generator-build
01/05/2024 12:22 AM 80 index-browser.js
01/05/2024 12:22 AM 31 index.d.ts
01/05/2024 12:22 AM 59 index.js
01/05/2024 12:22 AM 5,707 package.json
01/05/2024 12:22 AM 2,645 README.md
01/05/2024 12:22 AM runtime
01/05/2024 12:22 AM scripts
9 File(s) 8,713 bytes

Directory of C:\Users\24\test\node_modules\prisma\prisma-client\generator-build

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 687,260 index.js
1 File(s) 687,260 bytes

Directory of C:\Users\24\test\node_modules\prisma\prisma-client\runtime

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 26 binary.d.ts
01/05/2024 12:22 AM 642,729 binary.js
01/05/2024 12:22 AM 241,429 edge-esm.js
01/05/2024 12:22 AM 241,650 edge.js
01/05/2024 12:22 AM 12,249 index-browser.d.ts
01/05/2024 12:22 AM 34,302 index-browser.js
01/05/2024 12:22 AM 102,531 library.d.ts
01/05/2024 12:22 AM 200,658 library.js
01/05/2024 12:22 AM 4,259,130 query-engine.wasm
9 File(s) 5,734,704 bytes

Directory of C:\Users\24\test\node_modules\prisma\prisma-client\scripts

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 5,732 colors.js
01/05/2024 12:22 AM 314 default-deno-edge.ts
01/05/2024 12:22 AM 322 default-edge.js
01/05/2024 12:22 AM 321 default-index-browser.js
01/05/2024 12:22 AM 3,989 default-index.d.ts
01/05/2024 12:22 AM 2,189 default-index.js
01/05/2024 12:22 AM 354 get-packed-client.js
01/05/2024 12:22 AM 304 postinstall.d.ts
01/05/2024 12:22 AM 13,544 postinstall.js
9 File(s) 27,069 bytes

Directory of C:\Users\24\test\node_modules\prisma\scripts

01/05/2024 12:22 AM

.
01/05/2024 12:22 AM ..
01/05/2024 12:22 AM 144 preinstall-entry.js
1 File(s) 144 bytes

 Total Files Listed:
         240 File(s)    129,282,632 bytes
         140 Dir(s)  27,133,448,192 bytes free
</details>

### How to reproduce

package.json
```json
{
  "dependencies": {
    "@prisma/client": "5.7.1"
  },
  "devDependencies": {
    "prisma": "5.7.1"
  }
}
  • npm i
  • In Command prompt (does not work in Power Shell): dir /s

Expected behavior

The size of the project on Windows should be smaller, like on Linux or macOS.

Prisma information

Environment & setup

  • OS: Windows 11
  • Database: NA
  • Node.js version: 20.10.1 - npm 10.2.3

Prisma Version

prisma                  : 5.7.1
@prisma/client          : 5.7.1
Computed binaryTarget   : windows
Operating System        : win32
Architecture            : x64
Node.js                 : v20.10.0
Query Engine (Node-API) : libquery-engine 0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5 (at node_modules\@prisma\engines\query_engine-windows.dll.node)
Schema Engine           : schema-engine-cli 0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5 (at node_modules\@prisma\engines\schema-engine-windows.exe)
Schema Wasm             : @prisma/prisma-schema-wasm 5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5
Default Engines Hash    : 0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5
Studio                  : 0.495.0

Activity

  1. added
    bug/2-confirmed
    kind/bug
    tech/typescript
    on Jan 5, 2024
  2. Jolg42 commented on Jan 5, 2024

    @Jolg42
    ContributorAuthor

    Notes:

    Related issue about .cache directory unexpectedly included when deploying using the Serverless framework on Windows
    #6670

    Related issue about .cache directory unexpectedly included in a Docker build on Windows
    #11577

    Solving this issue should closes the 2 issues mentioned here.

  3. santichausis commented on Jul 17, 2026

    @santichausis
    Contributor

    I'd like to take this on. Root cause: getRootCacheDir() in packages/fetch-engine/src/utils.ts uses find-cache-dir on Windows, which resolves a cache dir relative to the nearest package.json from process.cwd(). Since @prisma/engines's own postinstall script runs with a different cwd than a later prisma CLI invocation, this produces two different (and duplicate) cache directories, one of them nested inside node_modules\@prisma\engines\node_modules\.cache — matching exactly what's reported here. Opening a PR shortly that prefers APPDATA (a stable, user-level directory, same pattern already used as a fallback and mirroring how non-Windows platforms use ~/.cache/XDG_CACHE_HOME) over find-cache-dir.

  4. added a commit that references this issue on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/2-confirmedkind/bugtech/typescripttopic: engine downloadtopic: performance/sizetopic: windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions