mikro-orm/nestjs

@mikro-orm/entity-generator is causing error

rizchaerul opened this issue · 5 comments

Describe the bug
I made a repo to reproduce the bug: https://github.com/rizchaerul/bug

Hi, so earlier i made an issue here #40. I found out what causing it, it's the entity-generator.

To Reproduce
Steps to reproduce the behavior:

  1. Clone from https://github.com/rizchaerul/bug
  2. Run pnpm i
  3. Run yarn start:dev
  4. It will show error
  5. Run pnpm uninstall @mikro-orm/entity-generator
  6. The error is gone

Versions

Dependency Version
node ?
typescript 4.3.5
mikro-orm 4.5.9
your-driver postgresql

Wait, i'll check the repo one more time. Edit: should be okay now

B4nan commented

It works just fine for me (used yarn for installation, not really interested in trying out different package managers).

image

What I said is #40 still applies. If you see that error, your local installation is wrong - you probably have multiple installations of some packages (probably @mikro-orm/knex as that is where the SqlEntityManager is defined).

Yeah i just tried yarn and it works, so is it pnpm fault?

B4nan commented

or it was just messed up installation, have you tried removing node_modules and the lock file?

What i tried is this

  1. Remove node_modules, lock file, dist
  2. yarn install
  3. yarn start:dev -> works fine
  4. Remove node_modules, lock file, dist
  5. pnpm install
  6. pnpm run start:dev -> error
  7. pnpm uninstall @mikro-orm/entity-generator
  8. pnpm run start:dev -> works fine again

So yeah i don't think i'm doing something wrong, it must be pnpm at fault here. So i'll just use yarn for my project.