You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read properties of undefined (reading 'getHello')
at AppController.getHello (/home/satont/Tests/project-name/src/app.controller.ts:10:28)
at <anonymous> (/home/satont/Tests/project-name/node_modules/.pnpm/@[email protected]_fkqgj3xrohk2pflugljc4sz7ea/node_modules/@nestjs/core/router/router-execution-context.js:38:29)
at InterceptorsConsumer.intercept (/home/satont/Tests/project-name/node_modules/.pnpm/@[email protected]_fkqgj3xrohk2pflugljc4sz7ea/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:11:20)
at <anonymous> (/home/satont/Tests/project-name/node_modules/.pnpm/@[email protected]_fkqgj3xrohk2pflugljc4sz7ea/node_modules/@nestjs/core/router/router-execution-context.js:46:60)
at <anonymous> (/home/satont/Tests/project-name/node_modules/.pnpm/@[email protected]_fkqgj3xrohk2pflugljc4sz7ea/node_modules/@nestjs/core/router/router-proxy.js:9:23)
at Layer.Layer.handle_request (/home/satont/Tests/project-name/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/layer.js:95:5)
at next (/home/satont/Tests/project-name/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/route.js:144:13)
at Route.Route.dispatch (/home/satont/Tests/project-name/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/route.js:114:3)
at Layer.Layer.handle_request (/home/satont/Tests/project-name/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/layer.js:95:5)
at <anonymous> (/home/satont/Tests/project-name/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/index.js:284:15)
When class imported via nestjs DI as constructor(private readonly appService: AppService) {}
Reproduction:
npm i -g @nestjs/cli
nest new project-name
cd project-name
pnpm install
tsx src/main.ts
curl http://localhost:3000
I got error on
appService
property:When class imported via nestjs
DI
asconstructor(private readonly appService: AppService) {}
Reproduction:
npm i -g @nestjs/cli nest new project-name cd project-name pnpm install tsx src/main.ts curl http://localhost:3000
Or you can clone https://github.com/nestjs/typescript-starter, and perform latest 3 steps.
tsx version:
3.4.3
nodejs version:
18.2.0
Also as fact, i tested CJS and ESM, same behavior.
The text was updated successfully, but these errors were encountered: