D
Deno

help

Prisma error when trying to push/migrate db

AAnthony2be1/7/2024
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>
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
DAHDeno AI Helper1/7/2024
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.
Mmarvinh.1/7/2024
@Anthony2be that sounds like a bug in deno's node compat layer. Can you file an issue for that on the Deno tracker?
AAnthony2be1/7/2024
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
Mmarvinh.1/7/2024
Yup
AAnthony2be1/7/2024
K
AAnthony2be1/7/2024
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 ...

Looking for more? Join the community!

Recommended 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 Abortdeployctl error: TypeError: request or response body errorHey, I'm getting an error when trying to deploy to a project error: TypeError: request or response bdrizzle orm for deno and sqlite?does drizzle orm work with sqlite and deno?deno queues on deployDoes anyone have a simple example if deno queues + routing that works on demo deploycompile to target, 'unzip' not found.I am on linux ubuntu 22 I downloaded, uninstalled reinstalled, written to path unzip. however no matRecommendations for interacting with Excel sheets (.xlsx) and GraphQL?I want to use Deno in production. Specifically, I'm looking into building a script that reads a `.xlTrouble with Deno importsWhat's wrong with my import? The link is valid and I cached it. (https://deno.land/x/deno_dom@v0.1.How to format on save with devcontainerI'd like to automatically format my code when saving, but it's not working. devcontainer.json ```jsHow does form submission work?I'm following the tutorial: https://fresh.deno.dev/docs/getting-started/form-submissions It says: >Won't install `npm:@supabase/ssr`I'm trying to build something with Fresh and Supabase and would like to use the [`@supabase/ssr`](ht`RangeError: Offset is outside the bounds of the DataView` when trying to encrypt with AES-CRTHi, I'm trying to encrypt some files with aes128-crt, but I always get the error below. (Even if I j