找不到模块“@nestjs/core”或其相应的类型声明

时间:2021-06-26 18:48:26

标签: nestjs

几周前,我在我的计算机上全局安装了 NestJS。 现在我回到那个,开始学习。

所以我用命令创建了一个新项目:

nest new ./

它生成了所有文件,但是当我尝试使用命令运行此应用程序时:

nest start

我希望此模板项目可以启动,但导入路径时出现错误? 这是因为我安装的 Nest 版本还是什么原因?

屏幕上的错误: enter image description here

我的 Nest 版本: 7.5.6

Package.json:

  "dependencies": {
    "@nestjs/common": "^7.6.13",
    "@nestjs/core": "^7.6.13",
    "@nestjs/platform-express": "^7.6.13",
    "reflect-metadata": "^0.1.13",
    "rimraf": "^3.0.2",
    "rxjs": "^6.6.6"
  },
  "devDependencies": {
    "@nestjs/cli": "^7.5.6",
    "@nestjs/schematics": "^7.2.7",
    "@nestjs/testing": "^7.6.13",
    "@types/express": "^4.17.11",
    "@types/jest": "^26.0.20",
    "@types/node": "^14.14.31",
    "@types/supertest": "^2.0.10",
    "@typescript-eslint/eslint-plugin": "^4.15.2",
    "@typescript-eslint/parser": "^4.15.2",
    "eslint": "^7.20.0",
    "eslint-config-prettier": "^8.1.0",
    "eslint-plugin-prettier": "^3.3.1",
    "jest": "^26.6.3",
    "prettier": "^2.2.1",
    "supertest": "^6.1.3",
    "ts-jest": "^26.5.2",
    "ts-loader": "^8.0.17",
    "ts-node": "^9.1.1",
    "tsconfig-paths": "^3.9.0",
    "typescript": "^4.1.5"
  },

0 个答案:

没有答案