nest-cli icon indicating copy to clipboard operation
nest-cli copied to clipboard

[ERROR] Genearte command exception

Open tagimu opened this issue 8 years ago • 7 comments

[System Information]

  • OS Version: Windows 10
  • NodeJS Version : v9.8.0
  • NPM Version: 5.6.0

[Nest Information]

  • microservices version : 4.5.8
  • schematics version: 4.0.0-rc3
  • websockets version: 4.5.8
  • testing version : 4.5.5
  • common version: 4.5.9
  • core version: 4.5.10

[Command] nest generate module DataBase

[Error] Unexpected token ] in JSON at position 61 Failed to execute command : @nestjs/schematics:module --name=data-base --dry-run=false, see above.

I have used this command right after nest new. Project is clean.

tagimu avatar Apr 03 '18 11:04 tagimu

Hey @alfaproxima ! Thanks for feedbacks

I can't reproduce with my VM on Windows 7 and Node 8... I'm thinking about a Node 9 Regexp engine evolution...

I'll try to build a Windows 10 VM with Node 9

But can you try with a Node 8 version ?

And BTW why are you missing the core version ? Missing copy / paste ?

thomrick avatar Apr 03 '18 18:04 thomrick

@alfaproxima ! I can't reproduce your bug with the same configuration...

Thinking... do you have a comma after your last metadata array in you app.module.ts ?

thomrick avatar Apr 03 '18 19:04 thomrick

Hello @ThomRick ! Thank you for quick response.

I tried with Node v8.11.1 and had the same issue.

Thinking... do you have a comma after your last metadata array in you app.module.ts ?

Yes, I have it.

PS: I've updated my message with core version I forgot to copy last time.

PPS: As offtop. Your framework really awesome.

tagimu avatar Apr 04 '18 09:04 tagimu

Hey @alfaproxima thanks to @kamilmysliwiec for framework ;-)

Remove your comma and it will be ok I think your IDE apply some lint / code format and add it in the shadow :-P

I'll fix that lint issue in the next version !

thomrick avatar Apr 04 '18 11:04 thomrick

@ThomRick Yes, it works. Thank you!

TSLint and Prettier had default rules for trailing comma.

tagimu avatar Apr 04 '18 11:04 tagimu

Nice !

That's why I asked ab out it ;-)

Like I said fixed in the next version !!!

thomrick avatar Apr 04 '18 13:04 thomrick

Fix done please upgrade to 4.0.0-rc2 ;-)

thomrick avatar Apr 05 '18 18:04 thomrick