Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

initaite a pmt #53

Closed
Mohammad-Alismael opened this issue Aug 22, 2020 · 2 comments
Closed

initaite a pmt #53

Mohammad-Alismael opened this issue Aug 22, 2020 · 2 comments

Comments

@Mohammad-Alismael
Copy link

i think there is a typo because the application trying to read from PMT_MANAGMENT_URL
while the created one is MANAGMENT_URL
im on a mac

Installing @prisma-multi-tenant/client as a dependency in your app...
$> npm install @prisma-multi-tenant/[email protected]
npm WARN @nexus/[email protected] requires a peer of graphql@^14.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 0.13.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer de
pendencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer depend
encies yourself.
npm WARN [email protected] requires a peer of [email protected] - 0.13.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 14 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 0.13.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yoursel
f.
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of aws-lambda@^0.1.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies
yourself.
npm WARN [email protected] requires a peer of [email protected] - 14 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @nexus/schema@^0.13.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @prisma/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^14.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

We will now configure the management database:

? Management database url: "postgresql://postgres:123456@localhost:5432/postgres?schema=public"

? Are you sure of your inputs? Yes

Updating .env and schema.prisma files...

Generating prisma clients for both management and tenants...
$> node "/Users/apple/WebstormProjects/new-BackEnd-carRental/node_modules/@prisma/cli/build/index.js" generate --schema prisma/schema.prisma
Environment variables loaded from provided --schema directory

$> node "/Users/apple/WebstormProjects/new-BackEnd-carRental/node_modules/@prisma/cli/build/index.js" generate

✔ Generated Prisma Client to ........prisma-multi-tenant\management in 452ms

You can now start using Prisma Client in your code:

import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')

const prisma = new PrismaClient()

Explore the full API: http://pris.ly/d/client

Setting up management database...
$> node "/Users/apple/WebstormProjects/new-BackEnd-carRental\node_modules/@prisma/cli/build/index.js" migrate up --create-db --experimental
Error: P1012

Get config
error: Error validating datasource management: The URL for datasource management must start with the protocol file:.
--> schema.prisma:3
|
2 | provider = ["sqlite","mysql","postgresql"]
3 | url = env("PMT_MANAGEMENT_URL")
|

Validation Error Count: 1

Unknown Error!
Error: Command failed: node "/Users/apple/WebstormProjects/new-BackEnd-carRental/node_modules/@prisma/cli/build/index.js" migrate up --create-db --experimental
Error: P1012

Get config
error: Error validating datasource management: The URL for datasource management must start with the protocol file:.
--> schema.prisma:3
|
2 | provider = ["sqlite","mysql","postgresql"]
3 | url = env("PMT_MANAGEMENT_URL")
|

Validation Error Count: 1

at ChildProcess.exithandler (child_process.js:303:12)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1051:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {

killed: false,
code: 1,
signal: null,
cmd: 'node "/Users/apple/WebstormProjects/new-BackEnd-carRental//node_modules//@prisma//cli//build//index.js" migrate up --create-db --experimental'
}

)

@Errorname
Copy link
Owner

Hi 👋
Thank you for reporting this issue and sorry for taking this long to answer 🙏

It looks like you used quotes (") when providing the management url, can you retry without them?

@Errorname
Copy link
Owner

This issue looks to be a duplicate of #52 . Don't hesitate to reopen if it doesn't work for you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants