changing next.js pages after building

My project has 3 folders: server(node.js), client(next.js with custom server) and uploads(the images of products).
I have uploaded it in a Ubuntu 20.04 server and build next.js project. it works.
I have recently changed some pages of next.js and uploaded to client folder by “sudo git pull”.
Now I would like to run “npm run build” to build next.js again, but it gives Error:

warn - No ESLint configuration detected. Run next lint to begin setup

Build error occurred
Error: > Build directory is not writeable. https://nextjs.org/docs/messages/build-dir-not-writeable
at /home/skadmin/client/node_modules/next/dist/build/index.js:275:19
at async Span.traceAsyncFn (/home/skadmin/client/node_modules/next/dist/telemetry/trace/trace.js:60:20)
at async Object.build [as default] (/home/skadmin/client/node_modules/next/dist/build/index.js:77:25)
info - Creating an optimized production build

==========My Custom server is:
”’

const express = require('express')
const next = require('next')
const { createProxyMiddleware } = require('http-proxy-middleware')

const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()

app
.prepare()
.then(() => {
const server = express()
// apply proxy in dev mode
if (dev) {
server.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:8000',
changeOrigin: true,
})
)
}

server.all('*', (req, res) => {
  return handle(req, res)
})

server.listen(3000, (err) => {
  if (err) throw err
  console.log('> Ready on http://localhost:8000')
})
})
.catch((err) => {
console.log('Error', err)
})

”’
=======================package.json is=>:
”’

{
"name": "client",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "node server.js",
"build": "next build",
"start": "NODE_ENV=production node server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@ant-design/icons": "^4.5.0",
"@glidejs/glide": "^3.4.1",
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
"@persian-tools/persian-tools": "^3.0.1",
"antd": "^4.13.1",
"axios": "^0.21.4",
"express": "^4.17.1",
"http-proxy-middleware": "^2.0.0",
"lodash": "^4.17.21",
"moment-jalaali": "^0.9.2",
"multer": "^1.4.4",
"next": "^11.1.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.2.0",
"react-image-file-resizer": "^0.4.7",
"react-markdown": "^6.0.2",
"react-scroll": "^1.8.2",
"react-toastify": "^7.0.4",
"reactstrap": "^8.9.0",
"swiper": "^7.4.1"
}
}

”’

Please help me, what should I do?