Errorname / prisma-multi-tenant

🧭 Use Prisma as a multi-tenant provider for your application
MIT License
395 stars 45 forks source link

pmt init leads to error #72

Closed jaaneh closed 4 years ago

jaaneh commented 4 years ago

Hey there!

I'm trying to set up pmt so I am able to access two databases in the same app through prisma.

After installing prisma-multi-tenant, running pmt init and giving it the management db url, it hits an Cannot read property 'plural' of undefined at the Creating example script... step.

I am also getting this warning when going through init Warning: This version of prisma-multi-tenant is compatible with @prisma/cli@2.4.1, but you have @prisma/cli@2.10.1 installed. This may break in unexpected ways.

My local and globally installed @prisma/cli are at v2.4.1, so I'm not sure why this shows up even. Not sure if this could be related to the init error?

I've reinstalled all packages multiple times and I'm really at a loss at what to do here.

// global
"prisma-multi-tenant@2.3.1"
// deps
"@prisma-multi-tenant/client": "^2.3.1",
"@prisma/client": "^2.9.0",
// dev dep
"@prisma/cli": "2.4.1",

Any nudge in the right direction is greatly appreciated.

Errorname commented 4 years ago

Hi @jaaneh ! Thanks for the issue 🙏 There was indeed a bug following a change in Prisma. This should now have been resolved with the release of prisma-multi-tenant@2.4.1. Don't hesitate to reopen the issue if you still experience the issue

jaaneh commented 4 years ago

@Errorname Hey! I'm stuck at a EISDIR read error after upgrading to 2.4.1. Any ideas? Not sure if this is related to the upgrade, but can't find a way through this one.

Errorname commented 4 years ago

Ah! Yes, it's an issue with Windows and directories with a space in them. I'll fix this and release a new version

jaaneh commented 4 years ago

Ah! Yes, it's an issue with Windows and directories with a space in them. I'll fix this and release a new version

Appreciate it! I've stumbled across so many errors due to having 2 first names.

Errorname commented 4 years ago

It should now be fixed with pmt@2.4.2

jaaneh commented 4 years ago

We have a multi-tenancy-example.js file! Appreciate the help :-)