[ERROR] nest generate doesn't work when a module is called with forRoot()
I've been trying to generate a new module with the nest-cli but I got Unexpected token . in JSON at position 57
Running it again with verbose enabled, I noticed that the error is happening when going through the app.module.ts, it seems like it's failing on reading module names for which the forRoot() function is called.
Here is the output of the verbose mode :
[DEBUG] - ModuleMetadataParser::extractMetadataText() - text : { imports: [ CommonModule, MongooseModule.forRoot(process.env.DB_URL [DEBUG] - ModuleMetadataParser::format() - contentFormat : { "imports": [ "CommonModule", "MongooseModule"."forRoot"("process"."env"."DB"_"URL"
Unexpected token . in JSON at position 57
When I remove the .forRoot(), the command works fine.
hey @antoinm, Thx for your feedbacks !
We're currently working on the angular schematics way to generate artefacts and fix this issue.
Thanks to waiting for the next release...
The CLI tool was rebuild from scratch and integrate schematics to generate assets. Please upgrade to v4.0.0-rc1