netlify/cli

Netlify CLI crash with Prisma

marine-replic opened this issue · 1 comments

Describe the bug

Hi, netlify dev crashes when I try to run it with Prisma.

Here is the error I receive.

` Setting up the Edge Functions environment. This may take a couple of minutes.

replic2@0.0.0 dev
vite

⠏ Setting up the Edge Functions environment. This may take a couple of minutes.Port 5173 is in use, trying another one...
Port 5174 is in use, trying another one...

VITE v5.0.5 ready in 1818 ms

➜ Local: http://localhost:5175/
➜ Network: use --host to expose
⠋ Setting up the Edge Functions environment. This may take a couple of minutes.NestedError: Cannot read from C:/Users/dumon/OneDrive/Desktop/Replic/Code/2023/Replic/node_modules/.prisma: EISDIR: illegal operation on a directory, read
at Module.createReadStream (file:///C:/Users/dumon/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/dumon/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/cp-file/index.js:11:21)
at file:///C:/Users/dumon/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.22621
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Binaries:
Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (120.0.2210.61)`

Steps to reproduce

  1. Run git clone git@github.com/marine-replic/netlify-cli-issue
  2. Run netlify dev

Configuration

No response

Environment

System:
OS: Windows 11 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Memory: 766.82 MB / 7.72 GB
Binaries:
Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD

Fixed the bug by not using the alternative API with Lambda compatibility. See docs: https://docs.netlify.com/functions/get-started/?fn-language=ts#lambda-compatibility