#nest g resource failing
50 messages · Page 1 of 1 (latest)
Have you tried with this command npx nest g resource categories ?
I hadn't, but same error when i try
Have you tried reinstalling the NestJS CLI?
like 50 times, on all js package clients
Alternatively, you can use this command npx @nestjs/cli@latest without installing the cli globally.
npm uninstall -g @nestjs/cli, npm install -g @nestjs/cli, yarn global add @nestjs/cli, etc
same error
everything I try gives that same damn error, no frustrating
and there's no helpful error message beyond what it gives
so I have no idea why it's not working
it's probably some bs typescript/node_module/config issue
What version of the NestJS CLI do you have installed?
9.3.0
looks like its a bug: https://github.com/nestjs/nest-cli/issues/1987
Very strange, I just installed the latest version and tried and me it works( see screenshot) what operating system are you using ?
Me too, what version of Node do you use?
I'll try using pnpm and yarn see if I can replicate the error
I am using node v18.15 but I don't know if it is a nodejs version issue.
I'll try that specific version but I doubt that's the cause
yeah no dice
going to guess it's a typescript issue, but exactly what im not sure
I tried using pnpm and it works for me
yeah I have no idea what the difference is tbh
let me try on a new app
yeah that works, so it's an app-specific issue
but like... what?
yeah a fresh app works, but my medium sized existing app doesn't
but I have no idea how to troubleshoot it
what version do you have of the package @nestjs/cliin package.json ?
and how did you set up the nest-cli.json?
"@nestjs/cli": "^9.0.0" in package.json, and nest-cli.json is ```json
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
}
}
everything seems ok, another idea I can think of is to try to update nestjs dependencies to the latest versions
tried that about 5 minutes ago, all the package version in the new nest js i put into my existing nest app, same error
the only difference now is that my existing app has all of the project-specific dependencies, but i'd be surprised if they were causing the error
my tsconfig.build.json files as the experimental decorators feature enabled, but again i doubt that's the culript
my terminal also throws the error, so it's not a VSCode issue
lol not sure what else to check honestly
maybe it's a prisma thing (although again i don't imagine why it would be), maybe it's a typescript thing (but where)
Very strange, the only one would be to create a minimal reproduction on a cloneable git repository as soon as you have some time.
You can also make a post in this topic: https://github.com/nestjs/nest-cli/issues/1987 since it is not locked
yeah could do that, as a short term solution I might just generate inside a /tmp repository and copy over to my project
thanks for debugging with me man, i'll revisit it again next week
You're welcome, if I can help I will gladly do so. 👍