-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot start application because of PersistenceManager injection #5
Comments
Potentially related to this issue liberation-data/drivine#47 |
Experiencing the same problem.
ingredient.module.ts
ingredient.repository.ts
|
Remove
This is required to make If this fixes the issue, let us know, so that it can be closed. ExplanationIn Drivine you can have one database defined as the Interesting Points
|
All ok @ElePhontitis ? Can I close the issue? |
@jasperblues as I did not open it, I didn't feel entitled to determine that, but you have an ok from my side. Thanks a lot for your quick response! |
Oops, sorry! I didn't realize that there were two people having the same issue. Let's wait for @jdelibas to confirm that the issue is solved for him too. I'm going to have to improve the docs. |
I had the same problem, but I followed the steps informed and everything went well env file
Main module @Module({
imports: [
DrivineModule.withOptions(<DrivineModuleOptions>{
connectionProviders: [DatabaseRegistry.buildOrResolveFromEnv('NEO')],
}),
UserModule,
TaskModule,
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {} User module context @Module({
imports: [],
controllers: [UserController],
providers: [UserRepository, UserService],
exports: [],
})
export class UserModule {} Repository @Injectable()
export class UserRepository {
constructor(
@InjectPersistenceManager('NEO')
readonly persistenceManager: PersistenceManager,
) {}
async save(user: User): Promise<void> {
await this.persistenceManager.execute(
new QuerySpecification(
`MERGE (u:User {ID: "${user.ID}", name: "${user.name}"} )`,
),
);
}
} All running perfectly. I Think can close this issue |
Local neo4j instance running at v4.1
.env
confirgurationLogs
New to nest not entirely sure where the issue is,
PersistenceManager
isnt injected into theHealth
module directly.Two injection points I think are the
HealthRepository
and the root instantiation ofDrivine
Is there a need to inject
PersistenceManager
into each module?Note
Removed the
^
from all the deps in the package.json and deleted to package-lock.json and did a cleannpm i
still ran into the same issue.Wanted to make sure some other dependencies weren't causing the issue
The text was updated successfully, but these errors were encountered: