Netlify-CLI crash when installing prisma client

I recently wrote a post on stackoverflow:
mysql - Installing prisma with vite-netlify project - Stack Overflow

Basicly running my project on my pc with “netlify dev”, I tried to install prisma and initiate it - so far so good. I run the command “prisma generate” to create the client and now when I try to run “netlify dev” I get this error:

◈ Netlify Dev ◈
◈ Ignored general context env var: LANG (defined in process)
◈ Injected .env file env var: MAPLE_CONTENTFUL_SPACE_ID     
◈ Injected .env file env var: MAPLE_CONTENTFUL_ACCESS_KEY   
◈ Injected .env file env var: RECAPTCHA_KEY
◈ Injected .env file env var: RECAPTCHA_CLIENT
◈ Injected .env file env var: ReCAPTCHA_LOCALHOST
◈ Injected .env file env var: DATABASE_URL
◈ Setting up local development server
◈ Starting Netlify Dev with Vite

> maplebgu-react@0.0.0 dev
> vite


  VITE v4.4.7  ready in 2019 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
✔ Waiting for framework port 5173. This can be configured using the 'targetPort' property in the netlify.toml

   ┌─────────────────────────────────────────────────┐
   │                                                 │
   │   ◈ Server now ready on http://localhost:8888   │
   │                                                 │
   └─────────────────────────────────────────────────┘

◈ Failed to load function recaptcha: Cannot read from `C:/Users/playe/OneDrive/Documents/GitHub/MapleBGU/mapleBGU-react/node_modules/.prisma`: EISDIR: illegal operation on a directory, read
◈ Failed to load function register: Cannot read from `C:/Users/playe/OneDrive/Documents/GitHub/MapleBGU/mapleBGU-react/node_modules/.prisma`: EISDIR: illegal operation on a directory, read
◈ Failed to load function contentful: Cannot read from `C:/Users/playe/OneDrive/Documents/GitHub/MapleBGU/mapleBGU-react/node_modules/.prisma`: EISDIR: illegal operation on a directory, read

 »   Error: Netlify CLI has terminated unexpectedly
This is a problem with the Netlify CLI, not with your application.
If you recently updated the CLI, consider reverting to an older version by running:

npm install -g netlify-cli@VERSION

You can use any version from https://ntl.fyi/cli-versions.

Please report this problem at https://ntl.fyi/cli-error including the error details below.

NestedError: Cannot read from `C:/Users/playe/OneDrive/Documents/GitHub/MapleBGU/mapleBGU-react/node_modules/.prisma`: EISDIR: illegal operation on a directory, read
    at Module.createReadStream (file:///C:/Users/playe/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/cp-file/fs.js:21:9) 
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at copyFileAsync (file:///C:/Users/playe/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/cp-file/index.js:11:21)       
    at file:///C:/Users/playe/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/p-map/index.js:141:20
Caused By: Error: EISDIR: illegal operation on a directory, read

  System:
    OS: Windows 10 10.0.19043
    CPU: (4) x64 Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
  Binaries:
    Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 117.0.5938.134
    Edge: Spartan (44.19041.1266.0), Chromium (118.0.2088.27)

I have 3 serverless functions but non of them use the prisma client yet. The wierd part is that when I remove all of the functions (the “netlify-functions” folder becomes empty) the project runs great, but the moment I add one of the functions back (or even create a new simple one) I get this error again.

Did you try reporting an error on the CLI repo as mentioned:

We can try to help, but we’d need to see a reproduction repo to check or verify the issue.