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 } }
分类:
next.js
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探