简体   繁体   中英

Use NestJS framework and Neo4j

I am developing a typescript API, and i would like to use Neo4j as my database. I have tried using this package, but i get the following errors (i have followed the quick start guide): 在此处输入图像描述

I have also found the tutorial , where the creator creates this package step by step, which i have not followed as of yet, because i have just installed his package.

My question is, is there a simpler way to user neo4j and nestjs or would it be a better decision to use a javascript api and neo4j (as i could just simply use the neo4j driver package in that case)?

I think you are missing or installed the latest neo4j-driver , you will need to install 4.2.3 or below to make nest-neo4j works.

npm install neo4j-driver@4.2.3
// or
yarn add neo4j-driver@4.2.3

For a full example, you can follow this: https://github.com/neo4j-examples/nestjs-neo4j-realworld-example

To use nestjs, you need to integrate neo4j with the framework so that it can be injected in your services. I don't think there is an easy way to use neo4j with nestjs unless you don't need the injection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM