我开发了一些应用程序,当我尝试了
npm run start
发生附件错误。
似乎找不到模块bcrypt
。
user.repository.js
从ts
编译为js
以下是导入bcrypt
const bcrypt = require("bcrypt");
在package.json
,我安装了@types/bcrypt
"dependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/config": "^0.5.0",
"@nestjs/core": "^7.0.0",
"@nestjs/jwt": "^7.1.0",
"@nestjs/passport": "^7.1.0",
"@nestjs/platform-express": "^7.0.0",
"@nestjs/typeorm": "^7.1.0",
"@types/bcrypt": "^3.0.0",
"@types/cookie-parser": "^1.4.2",
"@types/joi": "^14.3.4",
"class-transformer": "^0.3.1",
"class-validator": "^0.12.2",
"cookie-parser": "^1.4.5",
"joi": "^17.2.0",
"mysql": "^2.18.1",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",
"pluralize": "^8.0.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^6.5.4",
"typeorm": "^0.2.25"
为什么会出错??
如果有人有意见,请告诉我,谢谢。