running "netlify dev" fails after installing Prisma
DinEilie opened this issue · 0 comments
Describe the bug
I have a Netlify (vite-react) project with 3 serverless functions that work great.
I want to install Prisma with the project, I followed the instructions according to the offical Prisma website:
https://www.prisma.io/docs/getting-started/quickstart
https://www.prisma.io/docs/guides/deployment/serverless/deploy-to-netlify
therefore the prisma.schema looks like this:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x", "rhel-openssl-1.1.x"]
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model users {
username String @id @db.VarChar(12)
email String @unique(map: "email") @db.VarChar(254)
password String @db.VarChar(24)
date String @db.VarChar(255)
}
It's important to mention I didn't receive any errors while installing Prisma.
and my netlify.toml looks like this:
[build]
functions = "netlify-functions/"
command = "npm run build"
publish = "dist"
Now when I run "netlify dev" on my pc I get this error and the project would not run:
`C:\Users\playe\OneDrive\Documents\GitHub\MapleBGU\mapleBGU-react>netlify dev
◈ 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 1931 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: 10.2.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 118.0.5993.118
Edge: Spartan (44.19041.1266.0), Chromium (119.0.2151.44)
It's important to know that the moment I remove Prisma from the project, it works completely fine (reinstalling Prisma and updating Netlify CLI didn't work).
Steps to reproduce
- Install prisma acording to the offical website
- run "netlify dev" on local machine (windows).
- project fails and exit
Configuration
functions = "netlify-functions/"
command = "npm run build"
publish = "dist"
Environment
System:
OS: Windows 10 10.0.19043
CPU: (4) x64 Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
Memory: 6.64 GB / 15.93 GB
Binaries:
Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
npm: 10.2.0 - C:\Program Files\nodejs\npm.CMD