nest-cli
nest-cli copied to clipboard
Unexpected token . in JSON at position 37
When trying to generate a module with either --dry-run or without it getting the following error
Unexpected token . in JSON at position 37 🙀 Failed to execute command: @nestjs/schematics:module --name=foo --dry-run=true
But the command works if I remove the MongooseModule from the imports on the module.
My app.module file looks like this
import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
@Module({
imports: [
MongooseModule.forRoot('mongodb://localhost:27017/foo', {
useNewUrlParser: true
}),
...
],
controllers: [],
providers: []
})
export class AppModule {}
I am using nest 5.0.0, with the cli version 5.1.0. Not sure if this is something I am doing wrong.
It should fixed with the latest CLI version. Please upgrade and let me know ;-)
Hey @ThomRick, Confirmed works on with the current 5.3.0 cli version. Thanks a lot :)