nest使用InjectRepository的时候,一直提示"作为表达式调用时,无法解析参数修饰器的签名。类型undefined的参数不能赋给类型string,symbol的参数",运行起来都没有问题,就是它一直报这个提示,我node是v18.12.0
这是service
这是entity
这是module
这是tsconfig.json
这是package.json
{
"name": "nest-project",
"version": "1.0.0",
"author": "likai",
"license": "MIT",
"private": true,
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build --webpack --webpackPath=./webpack.config.js",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main"
},
"dependencies": {
"@nestjs/axios": "^3.0.1",
"@nestjs/common": "^8.1.1",
"@nestjs/core": "^8.1.1",
"@nestjs/jwt": "^10.2.0",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^8.1.1",
"@nestjs/swagger": "^5.2.0",
"@nestjs/typeorm": "^10.0.1",
"@types/uuid": "^10.0.0",
"bcryptjs": "^2.4.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"fastify-swagger": "^5.0.0",
"ip": "^2.0.1",
"lodash": "^4.17.21",
"moment": "^2.30.1",
"mysql2": "^3.6.5",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"reflect-metadata": "^0.1.13",
"request-ip": "^3.3.0",
"rimraf": "^3.0.2",
"rxjs": "^7.4.0",
"save": "^2.9.0",
"swagger-ui-express": "^4.3.0",
"typeorm": "^0.3.17",
"uuid": "^10.0.0"
},
"devDependencies": {
"@nestjs/cli": "^8.1.3",
"@nestjs/schematics": "^10.0.3",
"@types/bcryptjs": "^2.4.6",
"@types/express": "^4.17.13",
"@types/ip": "^1.1.3",
"@types/lodash": "^4.17.7",
"@types/node": "^16.11.1",
"@types/passport-jwt": "^4.0.1",
"@types/passport-local": "^1.0.38",
"@types/request-ip": "^0.0.41",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^10.2.4",
"eslint": "^7.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.3.1",
"fork-ts-checker-webpack-plugin": "^7.2.1",
"prettier": "^2.2.1",
"supertest": "^6.1.6",
"ts-loader": "^9.2.6",
"ts-node": "^10.9.2",
"tsconfig-paths": "^3.11.0",
"tslib": "^2.3.0",
"typescript": "^4.9.4",
"webpack": "^5.11.0"
}
}