因此,我NestJS
使用CLI 创建了一个新应用程序。我被nodemon
安装为依赖项并在全球范围内安装。我的package.json
样子是这样的:
"scripts": {
"build": "tsc -p tsconfig.build.json",
"format": "prettier --write \"src/**/*.ts\"",
"start": "ts-node -r tsconfig-paths/register src/main.ts",
"start:dev": "nodemon",
"start:debug": "nodemon --config nodemon-debug.json",
Run Code Online (Sandbox Code Playgroud)
我的nodemon.json
样子是这样的:
"watch": ["src"],
"ext": "ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "ts-node -r tsconfig-paths/register src/main.ts"
Run Code Online (Sandbox Code Playgroud)
因此非常基本的设置。但是,如果我尝试使用以下命令启动开发服务器,则会npm start:dev
收到以下错误消息:
Usage: npm < command >
where < command > is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, …
Run Code Online (Sandbox Code Playgroud)