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

[BUG] tsed init Issues: Vitest Works While Jest Fails #424

Closed
ygpark80 opened this issue Nov 29, 2024 · 3 comments
Closed

[BUG] tsed init Issues: Vitest Works While Jest Fails #424

ygpark80 opened this issue Nov 29, 2024 · 3 comments
Assignees
Labels

Comments

@ygpark80
Copy link

ygpark80 commented Nov 29, 2024

Information

  • Version: 6.0.1
  • Packages: @tsed/cli

tsed init with with Jest fails, but Vitest seems to work.

The following command works:

 npx -p @tsed/cli tsed init --features swagger,testing,vitest --package-manager npm -s .

However, this command does not:

 npx -p @tsed/cli tsed init --features swagger,testing,jest --package-manager npm -s .

Example

% npx -p @tsed/cli tsed init --features swagger,testing,jest --package-manager npm -s .
↓ Write RC files
↓ Write RC files
✔ Initialize package.json
✔ Install plugins
✔ Load plugins
✔ Install plugins dependencies
✔ Generate project files
✖ ENOENT: no such file or directory, open '/Users/ygpark80/Projects/blog/dist/myproject/node_modules/@tsed/cli-plugin-jest/templates/init/vi.config.js.hbs'
◼ Generate barrels files
[Error: ENOENT: no such file or directory, open '/Users/ygpark80/Projects/blog/dist/myproject/node_modules/@tsed/cli-plugin-jest/templates/init/vi.config.js.hbs'] {
  name: 'CLI_ERROR',
  cli: Cli {
    injector: InjectorService(48) [Map] {
      [class CliConfiguration extends DIConfiguration] => [Provider],
      [class ProjectPackageJson] => [Provider],
      [class CliFs] => [Provider],
      [class CliCore] => [Provider],
      [Function: Configuration] => [Provider],
      Symbol(LOGGER) => [Provider],
      [class Logger] => [Provider],
      [Function: CliPackageJson] => [Provider],
      [class CliExeca] => [Provider],
      [class BunManager extends BaseManager] => [Provider],
      [class NpmManager extends BaseManager] => [Provider],
      [class PNpmManager extends BaseManager] => [Provider],
      [class CliYaml] => [Provider],
      [class YarnBerryManager extends BaseManager] => [Provider],
      [class YarnManager extends BaseManager] => [Provider],
      [class PackageManagersModule] => [Provider],
      [class CliHooks] => [Provider],
      [class CliService] => [Provider],
      [class CliDockerComposeYaml] => [Provider],
      [class CliProxyAgent] => [Provider],
      [class CliHttpClient extends CliHttpLogClient] => [Provider],
      [class CliLoadFile] => [Provider],
      [class NpmRegistryClient] => [Provider],
      [class CliPlugins] => [Provider],
      [class CliRunScript] => [Provider],
      [class RootRendererService extends Renderer] => [Provider],
      [class SrcRendererService extends Renderer] => [Provider],
      [class ScriptsRendererService extends Renderer] => [Provider],
      [class AddCmd] => [Provider],
      [class ProvidersInfoService] => [Provider],
      [class ClassNamePipe] => [Provider],
      [class OutputFilePathPipe] => [Provider],
      [class RoutePipe] => [Provider],
      [class GenerateCmd] => [Provider],
      [class InitExpressPlatform] => [Provider],
      [class InitKoaPlatform] => [Provider],
      [class InitPlatformsModule] => [Provider],
      [class NodeRuntime extends BaseRuntime] => [Provider],
      [class BabelRuntime extends NodeRuntime] => [Provider],
      [class BunRuntime extends BaseRuntime] => [Provider],
      [class WebpackRuntime extends BabelRuntime] => [Provider],
      [class RuntimesModule] => [Provider],
      [class InitCmd] => [Provider],
      [class RunCmd] => [Provider],
      [class UpdateCmd] => [Provider],
      [class JestGenerateHook] => [Provider],
      [class JestInitHook] => [Provider],
      [class CliPluginJestModule] => [Provider],
      logger: [Logger],
      resolvedConfiguration: true
    },
    cliService: CliService {
      reinstallAfterRun: true,
      program: [Command],
      pkg: [Object],
      hooks: CliHooks {},
      projectPkg: [ProjectPackageJson],
      packageManagers: [PackageManagersModule],
      commands: [Map]
    }
  },
  origin: [Error: ENOENT: no such file or directory, open '/Users/ygpark80/Projects/blog/dist/myproject/node_modules/@tsed/cli-plugin-jest/templates/init/vi.config.js.hbs'] {
    errno: -2,
    code: 'ENOENT',
    syscall: 'open',
    path: '/Users/ygpark80/Projects/blog/dist/myproject/node_modules/@tsed/cli-plugin-jest/templates/init/vi.config.js.hbs'
  }
}
Copy link

🎉 Are you happy?

If you appreciated the support, know that it is free and is carried out on personal time ;)

A support, even a little bit makes a difference for me and continues to bring you answers!

github opencollective

@Romakita
Copy link
Contributor

Hi @ygpark80
Thanks for your help :D
the fix will be released in few minutes!

@Romakita
Copy link
Contributor

🎉 This issue has been resolved in version 6.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants