nestjs / nest-cli

CLI tool for Nest applications 🍹
https://nestjs.com
Other
1.98k stars 394 forks source link

cli/service is throwing bug #2783

Closed genGit963 closed 2 weeks ago

genGit963 commented 3 weeks ago

Is there an existing issue for this?

Current behavior

cmd : nest generate service todo

Error: (0 , util_1.isNullOrUndefined) is not a function

Failed to execute command: node @nestjs/schematics:service --name=todo --no-dry-run --no-skip-import --language="ts"--source-root="src" --spec --no-flat --spec-file-suffix="spec"

Minimum reproduction code

https://github.com/genGit963/tma

Steps to reproduce

  1. nest generate service todo

Expected behavior

Should have generated /src/todo/todo.service.ts and /src/todo/todo.service.spec.ts and updated todo.module.ts @Module() providers

Package version

^10.0.0

NestJS version

^10.0.0

Node.js version

23.1.0

In which operating systems have you tested?

Other

No response

micalevisk commented 3 weeks ago

this was resolved but we have to wait for a new release of the @nestjs/cli that is using @nestjs/schematics v10.2.3+ (#2770)

Also, a side-suggestion: don't use nodejs v23 unless you're a lib author or something like that

kamilmysliwiec commented 2 weeks ago

@nestjs/schematics is not locked https://github.com/nestjs/nest-cli/blob/master/package.json#L44 so just install the latest version and you should be fine