#Cannot manage to start dev-tool in an @nx/node project

8 messages · Page 1 of 1 (latest)

amber ginkgo
#

i am using nx to manage a mono repo. So far i have microservices written with nestjs and they all work quite nicely.

however, i cannot manage to startup the dev-tool, as reported here: https://github.com/nestjs/nest/issues/12193

the error being: --> the application starts up regularly, but the localhost:8000 page shows this messsage:

"GET is not allowed for the request."

any hints ?

GitHub

Is there an existing issue for this? I have searched the existing issues Current behavior i have setup the devtool following the nestjs guide. NOTE: my project was bootstrapped using "nx"...

vagrant escarp
#

Can you provide a minimum reproduction so we could verify this?

amber ginkgo
#
app.module.ts

@Module({
  imports: [
    DevtoolsModule.register({
      http: process.env.NODE_ENV.trim() == 'development',
      port: 8000
    }),
....


main.ts

async function bootstrap() {
  let snapshot = process.env.NODE_ENV == 'development'
  const app = await NestFactory.create(AppModule, {
    logger:
      process.env.NODE_ENV == 'production'
        ? ['error', 'warn', 'log']
        : ['log', 'error', 'warn', 'debug', 'verbose'],
    snapshot,
    // abortOnError: false,
  });
...


package.json

"@nestjs/apollo": "^12.0.7",
    "@nestjs/axios": "^3.0.0",
    "@nestjs/bull": "^10.0.1",
    "@nestjs/cache-manager": "^2.1.0",
    "@nestjs/common": "^10.1.3",
    "@nestjs/config": "^3.0.0",
    "@nestjs/core": "^10.1.3",
    "@nestjs/event-emitter": "^2.0.0",
    "@nestjs/graphql": "^12.0.8",
    "@nestjs/microservices": "^10.1.3",
    "@nestjs/platform-express": "^10.1.3",
    "@nestjs/sequelize": "^10.0.0",
  "@nestjs/devtools-integration": "^0.1.5",


run command:


node dist/apps/.../main.js

vagrant escarp
#

That doesn't help. A minimum reproduction is a git repo or similar that we can run ourselves and see the same failure behavior

amber ginkgo
#

unfortunately the code base is too comprehensive to extract in a single repo. i might need to spend some effort to reproduce

but are the steps i followed above enough to start the dev-tool? or am i missing something?

note that i am not using the command "nest" to start the environment. is this necessary ?

vagrant escarp
#

The nest start command is essentially just tsc build && node dist/main or similar. Nothing special about how it starts the server or anything

#

What's the full error you're getting?

amber ginkgo
#

the thing is, i am getting no error whatsoever, i am only getting the HTML page you see here in the picture: https://github.com/nestjs/nest/issues/12193#issuecomment-1668358782. this makes me think that the devtool server is indeed starting, and it is able to bind the selected port (8000 in the example),

so the only log i can provide so far is: "GET is not allowed for the request."

do you also need me to send you the headers ?

GitHub

Is there an existing issue for this? I have searched the existing issues Current behavior i have setup the devtool following the nestjs guide. NOTE: my project was bootstrapped using "nx"...