你瞅啥呢

2024-03-06 NestJs学习日志之新建nest项目,运行启动命令nest start报错:Could not find TypeScript configuration file "tsconfig.json". ==》你应该在nest项目里面运行启动命令,而不是其他的目录

如题,低级错误。具体报错:

Could not find TypeScript configuration file "tsconfig.json". Please, ensure that you are running this command in the appropriate directory (inside Nest workspace)

找不到TypeScript配置文件“tsconfig.json”。请确保您在适当的目录(Nest工作区内)中运行此命令

报错原因:我在nest项目的上一级运行了启动命令,这显然是不对的。程序执行命令后没有在当前目录里找到tsconfig.json,故而报错。

什么?你说你已经在nest目录里运行启动命令还是报错???

那么,应该是你的项目的tsconfig.json被你误删了,亦或者本来就没有,但是需要你手动去创建一个tsconfig.json文件,以我的tsconfig.json文件为例:

复制代码
{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "ES2021",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "skipLibCheck": true,
    "strictNullChecks": false,
    "noImplicitAny": false,
    "strictBindCallApply": false,
    "forceConsistentCasingInFileNames": false,
    "noFallthroughCasesInSwitch": false
  }
}
复制代码

 

posted @   叶乘风  阅读(182)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
点击右上角即可分享
微信分享提示