小编Max*_*tgt的帖子

npm无法启动:NestJS应用程序上的dev

因此,我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)

npm nodemon nestjs

2
推荐指数
1
解决办法
736
查看次数

标签 统计

nestjs ×1

nodemon ×1

npm ×1