using prisma on Windows 10. I need to generate prisma in an offline mode. No internet access in pipeline. My package.json as below;
{
"name": "hello-prisma",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"@types/node": "^17.0.13",
"prisma": "^3.8.1",
"ts-node": "^10.4.0",
"typescript": "^4.5.5"
}
}
and schema.prisma as follows;
generator client {
provider = "prisma-client-js"
engineType="binary"
binaryTargets=["native"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
.env file as follows;
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/countrydb?schema=auth
PRISMA_CLI_QUERY_ENGINE_TYPE=binary
PRISMA_QUERY_ENGINE_BINARY=node_modules/@prisma/engines/query_engine-windows.dll
PRISMA_MIGRATION_ENGINE_BINARY=node_modules/@prisma/engines/migration-engine-windows.exe
PRISMA_INTROSPECTION_ENGINE_BINARY=node_modules/@prisma/engines/introspection-engine-windows.exe
PRISMA_FMT_BINARY=node_modules/@prisma/engines/prisma-fmt-windows.exe
DEBUG="*"
when I run npx prisma generate below JSON input error happens;
$ npx prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Error: Get config: SyntaxError: Unexpected end of JSON input
Environment & setup
- OS: Windows
- Database: PostgreSQL
- Node.js version: v14.17.2
Prisma Version
prisma : 3.8.1
@prisma/client : 3.8.1
Current platform : windows