marianozunino / morpheus

Morpheus is a modern, open-source database migration tool for Neo4j. It is designed to be a simple, intuitive tool for managing database migrations. The project is inspired by Michael Simons' tool for Java.
MIT License
19 stars 4 forks source link

Update peerDependencies #38

Closed Brakebein closed 10 months ago

Brakebein commented 11 months ago

Thanks for the quick upgrade to NestJs@10 (#36). However, I'm getting the next error:

Nest can't resolve dependencies of the CliService (MigrationService, FsService, ?, LoggerService). Please make sure that the argument LazyModuleLoader at index [2] is available in the CliModule context.

This is due to that I was using a slightly different NestJs version (10.2.8) than morpheus4j has in its dependencies (10.2.10). Hence, the application tries to execute the code from two nestjs/core packages in the node_modules, which is causing this error. If I match your NestJs dependency version, it works.

So, I suggest that you move the nestjs dependencies from dependencies to devDependencies (otherwise the declared peerDependencies are a bit useless anyway), to ensure your CliModule will take the code the from the nestjs package installed by the user, and morpheus does not come with its own nestjs package.

{
  "devDependencies": {
    "@nestjs/common": "^10.2.10",
    "@nestjs/config": "3.1.1",
    "@nestjs/core": "^10.2.10",
    ...
  },
  "dependencies": {
    "commander": "^11.1.0",
    ...
  },
  "peerDependencies": {
    "@nestjs/common": "^10.0.0",
    "@nestjs/core": "^10.0.0"
  },
}
marianozunino commented 11 months ago

Hey @Brakebein, Do you mind creating a PR for so?