netlify/cli

Can anyone of you please explain me why this error is showing?

Opened this issue · 0 comments

Describe the bug

I am making an api using express js and want to host it on netlify. However suddenly I got the following Error

// Before that this is my following code

import express from "express";
import serverless from "serverless-http";
const app = express();
const router = express.Router();
router.get("/", (req, res) => {
res.send("App is now running..");
});
router.get("/hello", (req, res) => {
res.send("Hello World!");
});
app.use("/.netlify/functions/api", router);

export default serverless(app);

// This is the error

Error: EPERM: operation not permitted, symlink 'D:\github Repo\compressimages\node_modules.pnpm\content-type@1.0.5\node_modules\content-type' -> 'D:\github Repo\compressimages.netlify\functions-serve\api\node_modules.pnpm\express@4.19.2\node_modules\content-type'

System:
OS: Windows 10 10.0.22000
CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-1235U
Binaries:
Node: 20.12.2 - D:\nodejs\node.EXE
npm: 10.3.0 - D:\nodejs\npm.CMD
Browsers:
Chrome: 124.0.6367.119
Edge: Spartan (44.22000.120.0), Chromium (123.0.2420.97)

// Also this is the package.json file

{
"name": "c",
"version": "1.0.0",
"type": "module",
"description": "",
"main": "index.js",
"scripts": {
"build": "netlify deploy --prod",
"dev": "netlify dev"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@netlify/functions": "^2.6.0",
"express": "^4.19.2",
"hono": "^4.3.0",
"serverless-http": "^3.2.0"
},
"devDependencies": {
"@types/express": "^4.17.21"
}
}

Steps to reproduce

I just did "netlify dev" in the terminal and boom got the error

Configuration

[build]
functions = "functions"

Environment

System:
OS: Windows 11 10.0.22000
CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-1235U
Memory: 1.20 GB / 7.68 GB
Binaries:
Node: 20.12.2 - D:\nodejs\node.EXE
npm: 10.3.0 - D:\nodejs\npm.CMD
pnpm: 9.0.6 - ~\AppData\Local\pnpm\pnpm.CMD