Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where are the docs? #75

Closed
weeco opened this issue Apr 6, 2018 · 8 comments
Closed

Where are the docs? #75

weeco opened this issue Apr 6, 2018 · 8 comments

Comments

@weeco
Copy link

weeco commented Apr 6, 2018

The readme says one should check the nestjs documentation regarding the usage, but I couldn't find anything related to nest-cli usage in there.

Am I missing something?

@thomrick
Copy link
Contributor

thomrick commented Apr 6, 2018

The documentation is not yet published
You ca see the repository https://github.com/nestjs/docs.nestjs.com to follow when it will be published

@weeco
Copy link
Author

weeco commented Apr 9, 2018

I tried to use the built in help command instead, however I hit a roadblock when generating a new module.

PS C:\Users\username\Documents\project-api-v3> nest generate module common/config
Unexpected string in JSON at position 31
Failed to execute command : @nestjs/schematics:module --name=common/config --dry-run=false, see above.

Failed to execute command : @nestjs/schematics:module --name=common/config --dry-run=false, see above.
PS C:\Users\username\Documents\project-api-v3> nest generate module src/common/config
Unexpected string in JSON at position 31
Failed to execute command : @nestjs/schematics:module --name=src/common/config --dry-run=false, see above.

Failed to execute command : @nestjs/schematics:module --name=src/common/config --dry-run=false, see above.
PS C:\Users\username\Documents\project-api-v3> nest generate module config src/common
Unexpected string in JSON at position 31
Failed to execute command : @nestjs/schematics:module --name=config --path=src/common --dry-run=false, see above.

Failed to execute command : @nestjs/schematics:module --name=config --path=src/common --dry-run=false, see above.
PS C:\Users\username\Documents\project-api-v3> nest --version
4.0.0-rc2

I tried different paths because I wasn't sure what base path it would try to use. Any idea what I am doing wrong?

With the stable 3.x version I had the same issue, which had been closed here: #61 . Apparently it hasn't been fixed by the rewrite unless I am doing something wrong?

@thomrick
Copy link
Contributor

seems to be the module import that cause this issue...
I'll reproduce it and find a way to fix it one time at all ;-)

@thomrick
Copy link
Contributor

Can't reproduce the bug on a VM with Windows 10 version...
Can you bring nest info ?
Your app.module.ts file maybe ?

@weeco
Copy link
Author

weeco commented Apr 11, 2018

The app.module.ts:

import { HelmetMiddleware } from '@nest-middlewares/helmet';
import { MiddlewaresConsumer, Module, RequestMethod } from '@nestjs/common';
import { ConfigModule } from './common/config/config.module';
import { AuthMiddleware } from './middlewares/auth/auth-middleware';
import { AuthService } from './middlewares/auth/auth.service';
import { JwtStrategy } from './middlewares/auth/passport/jwt.strategy';
import { PlayersModule } from './routes/players/players.module';

@Module({
  imports: [ConfigModule, PlayersModule],
  controllers: [],
  components: [AuthService, JwtStrategy]
})
export class AppModule {
  public configure(consumer: MiddlewaresConsumer): void {
    consumer
      .apply(HelmetMiddleware)
      .forRoutes({ path: '*', method: RequestMethod.GET })
      .apply(AuthMiddleware)
      .forRoutes({ path: '*', method: RequestMethod.GET });
  }
}

@thomrick
Copy link
Contributor

Test written to check what happens !
Hope this will be quickly fixed !

@thomrick
Copy link
Contributor

Try to release today to enjoy the cli with the fix ;-)

@thomrick
Copy link
Contributor

Please upgrade to 4.0.0 or 5.0.0 depends on the Nestjs major version you want to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants