Hello guys.
I’m trying to start a local dev server for my development.
The nextJs framework itsself starts quite well. I can see and visit all pages.
While trying to call a netlify function I’m running into an Error:
NestedError: Cannot read from `[...]/beatraum/node_modules/.prisma`: EISDIR: illegal operation on a directory, read
at Module.createReadStream (file:///[...]/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:///[...]/npm/node_modules/netlify-cli/node_modules/cp-file/index.js:11:21)
at file:///[...]/npm/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/node_modules/p-map/index.js:141:20
Caused By: Error: EISDIR: illegal operation on a directory, read {
nested: [Error: EISDIR: illegal operation on a directory, read] {
errno: -4068,
code: 'EISDIR',
syscall: 'read'
},
errno: -4068,
code: 'EISDIR',
syscall: 'read',
name: 'CopyFileError'
}
This error occurs regardlessly whether I start the functions server with netlify dev or netlify functions:serve.
I deployed the website to netlify and the functions can be accessed and work as well.
This is my netlify.toml
# example netlify.toml
[build]
command = "npm run build"
functions = "netlify/functions"
publish = ".next"
[[plugins]]
package = "@netlify/plugin-nextjs"
## Uncomment to use this redirect for Single Page Applications like create-react-app.
## Not needed for static site generators.
#[[redirects]]
# from = "/*"
# to = "/index.html"
# status = 200
## (optional) Settings for Netlify Dev
## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection
[dev]
framework = "next"
command = "next dev -p 8080" # Command to start your dev server
targetPort = 8080 # Port that the dev server will be listening on
# publish = "dist" # Folder with the static content for _redirect file
## more info on configuring this file: https://docs.netlify.com/configure-builds/file-based-configuration/
My package.json
{
"name": "beatraum",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"export": "next export",
"debug": "netlify dev --inspect"
},
"dependencies": {
"@hapi/iron": "^7.0.0",
"@netlify/functions": "^1.4.0",
"@next/font": "13.1.6",
"@prisma/client": "^4.9.0",
"@types/node": "18.11.18",
"@types/react": "18.0.27",
"@types/react-dom": "18.0.10",
"cookie": "^0.5.0",
"eslint": "8.33.0",
"eslint-config-next": "13.1.6",
"netlify-dev-plugin": "^1.0.28",
"next": "13.1.6",
"passport": "^0.6.0",
"passport-local": "^1.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-netlify-forms": "^1.3.3",
"swr": "^2.0.3",
"typescript": "4.9.5",
"uuid": "^9.0.0"
},
"devDependencies": {
"autoprefixer": "^10.4.13",
"netlify-cli": "^12.10.0",
"postcss": "^8.4.21",
"prisma": "^4.9.0",
"tailwindcss": "^3.2.4"
}
}
I don’t find anything on the internet that helps me anymore.
Thank you for your help in advance!