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

nest 在框架写法下无法运行 #333

Closed
nervouself opened this issue Nov 23, 2021 · 2 comments
Closed

nest 在框架写法下无法运行 #333

nervouself opened this issue Nov 23, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@nervouself
Copy link

node version:14.18.1
pnpm version:6.22.1

稳定复现:是

复现路径:

  1. npx @modern-js/create
    log:
    npx: 1 安装成功,用时 1.746 秒
    ? 请选择你想创建的工程类型 应用
    ? 请选择开发语言 TS
    ? 请选择包管理工具 pnpm
    ? 是否需要支持以下类型应用 不需要
    ? 是否需要调整默认配置? 否

  2. pnpm run new
    log:
    ? 请选择你想要的操作 启用可选功能
    ? 启用可选功能 启用「BFF」功能
    ? 请选择 BFF 类型 框架模式
    ? 请选择运行时框架 Nest

  3. pnpm run dev
    log:
    ● Client █████████████████████████ setup (3%)
    watch run

[Nest] 96690 - 2021/11/23 下午3:47:41 LOG [NestFactory] Starting Nest application...
[Nest] 96690 - 2021/11/23 下午3:47:41 ERROR [ExceptionHandler] Nest can't resolve dependencies of the AppController (?). Please make sure that the argument Object at index [0] is available in the AppModule context.

Potential solutions:

  • If Object is a provider, is it part of the current AppModule?
  • If Object is exported from a separate @module, is that module imported within AppModule?
    @module({
    imports: [ /* the Module containing Object */ ]
    })

最小复现代码

nest-test.zip

@tqma113 tqma113 added the bug Something isn't working label Nov 25, 2021
@tqma113
Copy link
Contributor

tqma113 commented Nov 25, 2021

正在测试

@chenjiahan
Copy link
Member

测试了下,这个问题已经修复了,目前按照上述步骤可以正常运行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants