如题,低级错误。具体报错:
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 } }
标签:false,启动,nest,json,报错,true,tsconfig From: https://www.cnblogs.com/iuniko/p/18055941