'NEXT.JS n error of the type from prisma is not being built
When trying to compile a project on next js on a remote server, I get an error of the type imported from prism. But on the local machine, all types of this element are present, I don't understand why it turns out this way?
import db,{ Sales } from '../prisma'.
Error "{ Sales } -an error of the type from prisma is not being built".

But there are no problems with typing on the local server.
My docker-compose:
version: '3.4'
services:
app:
image: testapp
build:
context: .
dockerfile: ./Docker
restart: always
environment:
NODE_ENV: production
env_file: .env
ports:
- 3000:3000
depends_on:
- "db"
# command: sh -c "./wait-for-it.sh db:5432 && npm start"
db:
env_file:
- .env
image: postgres:latest
restart: always
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: passwords
POSTGRES_DB: db
ports:
- "5432:5432"
volumes:
- "db-data:/var/lib/postgresql/data:rw"
adminer:
image: adminer
restart: always
ports:
- 8080:8080
environment:
- PMA_ARBITRARY=1
volumes:
db-data: {}
Docker:
FROM node:16.5.0-alpine
RUN apk add --no-cache bash
ENV NODE_ENV=production
WORKDIR /app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY . .
EXPOSE 3000
RUN chown -R node /app
USER node
RUN npm run build
RUN npx prisma migrate deploy
RUN npx prisma generate
CMD ["npm", "start"]
package-json
{
"name": "next-opel",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"migrate": "prisma migrate dev",
"prisma:generate": "prisma generate",
"lint": "next lint"
},
"dependencies": {
"@emotion/react": "^11.8.2",
"@emotion/server": "^11.4.0",
"@emotion/styled": "^11.8.1",
"@mui/icons-material": "^5.6.2",
"@mui/material": "^5.5.3",
"@mui/x-data-grid": "^5.7.0",
"@prisma/client": "^3.11.1",
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.6",
"cookie-signature": "^1.2.0",
"cookies-next": "^2.0.4",
"express": "^4.18.1",
"imask": "^6.4.2",
"multer": "^1.4.4",
"nanoid": "^3.3.2",
"next": "12.1.0",
"next-connect": "^0.12.2",
"nodemailer": "^6.7.3",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-imask": "^6.4.2",
"react-swipeable-views": "^0.14.0",
"swiper": "^6.8.4"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.2",
"@types/express": "^4.17.13",
"@types/multer": "^1.4.7",
"@types/node": "17.0.23",
"@types/nodemailer": "^6.4.4",
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",
"@types/react-swipeable-views-utils": "^0.13.3",
"eslint": "8.12.0",
"eslint-config-next": "12.1.2",
"prisma": "^3.11.1",
"typescript": "4.6.3"
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|



