Anthony2be
Anthony2be6mo ago

Prisma error when trying to push/migrate db

PS C:\Users\adubo\Desktop\freshchat> deno task push
Task push deno run -A npm:prisma@latest db push
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "im not telling you"
Warning: Not implemented: ChildProcess.prototype.disconnect

Your database is now in sync with your Prisma schema. Done in 876ms

Running generate... (Use --skip-generate to skip the generators)
Warning: [Prisma auto-install on generate] Prisma could not find a package.json file in the inferred project root C:\Users\adubo\Desktop\freshchat. During the next step, when an auto-install of Prisma package(s) will be attempted, it will then be created by your package manager on the appropriate level if necessary.
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: sucrase@3.35.0
npm WARN Found: peer eslint-plugin-import@"^2.25.2" from eslint-config-airbnb-base@15.0.0
npm WARN node_modules/.deno/sucrase@3.35.0/node_modules/sucrase/node_modules/eslint-config-airbnb-base
npm WARN dev eslint-config-airbnb-base@"^15.0.0" from sucrase@3.35.0
npm WARN node_modules/.deno/sucrase@3.35.0/node_modules/sucrase
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-import@"^2.25.2" from eslint-config-airbnb-base@15.0.0
npm WARN node_modules/.deno/sucrase@3.35.0/node_modules/sucrase/node_modules/eslint-config-airbnb-base
npm WARN dev eslint-config-airbnb-base@"^15.0.0" from sucrase@3.35.0
npm WARN node_modules/.deno/sucrase@3.35.0/node_modules/sucrase
npm ERR! Cannot read properties of null (reading 'matches')

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\adubo\AppData\Local\npm-cache\_logs\2024-01-07T05_00_04_603Z-debug-0.log
Error: Command failed with exit code 1: npm i @prisma/client@5.7.1
PS C:\Users\adubo\Desktop\freshchat>
PS C:\Users\adubo\Desktop\freshchat> deno task push
Task push deno run -A npm:prisma@latest db push
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "im not telling you"
Warning: Not implemented: ChildProcess.prototype.disconnect

Your database is now in sync with your Prisma schema. Done in 876ms

Running generate... (Use --skip-generate to skip the generators)
Warning: [Prisma auto-install on generate] Prisma could not find a package.json file in the inferred project root C:\Users\adubo\Desktop\freshchat. During the next step, when an auto-install of Prisma package(s) will be attempted, it will then be created by your package manager on the appropriate level if necessary.
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: sucrase@3.35.0
npm WARN Found: peer eslint-plugin-import@"^2.25.2" from eslint-config-airbnb-base@15.0.0
npm WARN node_modules/.deno/sucrase@3.35.0/node_modules/sucrase/node_modules/eslint-config-airbnb-base
npm WARN dev eslint-config-airbnb-base@"^15.0.0" from sucrase@3.35.0
npm WARN node_modules/.deno/sucrase@3.35.0/node_modules/sucrase
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-import@"^2.25.2" from eslint-config-airbnb-base@15.0.0
npm WARN node_modules/.deno/sucrase@3.35.0/node_modules/sucrase/node_modules/eslint-config-airbnb-base
npm WARN dev eslint-config-airbnb-base@"^15.0.0" from sucrase@3.35.0
npm WARN node_modules/.deno/sucrase@3.35.0/node_modules/sucrase
npm ERR! Cannot read properties of null (reading 'matches')

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\adubo\AppData\Local\npm-cache\_logs\2024-01-07T05_00_04_603Z-debug-0.log
Error: Command failed with exit code 1: npm i @prisma/client@5.7.1
PS C:\Users\adubo\Desktop\freshchat>
7 Replies
Anthony2be
Anthony2be6mo ago
all ive done is just install prisma in a fresh project and try to use it this is my schema
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
provider = "prisma-client-js"
previewFeatures = ["deno"]
output = "../generated/client"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model User {
id Int @id @default(autoincrement())
email String @unique
name String?
}
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
provider = "prisma-client-js"
previewFeatures = ["deno"]
output = "../generated/client"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model User {
id Int @id @default(autoincrement())
email String @unique
name String?
}
i cant seem to find any solutions online
Deno AI Helper
Deno AI Helper6mo ago
It seems like you're encountering an error when trying to push your database schema using Prisma. The error message suggests that there's an issue with the npm install command for @prisma/client@5.7.1. The error message npm ERR! Cannot read properties of null (reading 'matches') suggests that there might be a problem with your npm dependencies or your package.json file. The documentation mentions that Deno does not respect or support any npm life cycle events like preinstall or postinstall. You must explicitly run the script entries you want to run. Also, the warning message Prisma could not find a package.json file in the inferred project root indicates that Prisma is having trouble finding your package.json file. Here are a few things you could try: 1. Ensure that your package.json file is in the root directory of your project. 2. Try running npm install or npm ci to ensure all your npm dependencies are correctly installed. 3. If you're using a version of Node.js that's not compatible with the version of Prisma you're using, you might need to upgrade or downgrade Node.js. 4. If none of the above work, you might want to try deleting your node_modules folder and package-lock.json file (if they exist), and then running npm install again. Remember, these suggestions are not from the documentation and are general debugging steps for this kind of issue.
marvinh.
marvinh.6mo ago
@Anthony2be that sounds like a bug in deno's node compat layer. Can you file an issue for that on the Deno tracker?
Anthony2be
Anthony2be6mo ago
I’ll try to do so when I get back home Should I just make an issue on the deno GitHub containing the error? Or is there a specific other place I should make it
marvinh.
marvinh.6mo ago
Yup
Anthony2be
Anthony2be6mo ago
K
Anthony2be
Anthony2be6mo ago
GitHub
Prisma gives an error on push/migrate · Issue #21841 · denoland/deno
Version: 1.39.2 Background: I was trying to add prisma to a fresh project using npm compat, install worked fine but when I tried to push the schema, it game an error Schema: // This is your Prisma ...
More Posts
Does the deno-astro-adapter will be updated to use astro 4? https://github.com/denoland/deno-astro-aDoes the deno-astro-adapter will be updated to use astro 4? https://github.com/denoland/deno-astro-a(In IntelliJ) Deno: Failed to load the import map at <absolute_path> (...)I just started working with Deno today, and I'm liking it quite a bit so far 🙂 rn I'm running into serde_v8::from_v8 for BigInts unsupported through `deserialize_any`Deserializing BigInts is currently not supported unless a specific type is requested (e.g. it's unsuimport plotly.js : invalid or unexpected token ?`import Plotly from "npm:plotly.js-dist";` yields Stack trace: SyntaxError: Invalid or unexpected tDeno deploy: "Error The deployment failed: ISOLATE_INTERNAL_FAILURE"what's this error? ```js Cloning repository (100%) Project linked successfully. Building first deploModule documentation preview in developmentI am trying to improve development experience when documenting Deno modules. What I would like to acFresh project creation hangingUpgraded deno to 1.39.2 this morning and tried to create a new fresh project. CLI just hangs after eRedirect which deno deploy instance is used?My scenario is that I have one websocket connection on east4 and one on east5 and they need to be abstd/http/setCookie doesn't work?It seems to only support single cookies: ```ts import * as cookies from "https://deno.land/std@0.21Abort signals and node compatibilityDeno and Node's `AbortSignal` types are not compatible. I have verified that I can use a deno Abort