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

Commitlint not supported #6184

Closed
notramo opened this issue Sep 29, 2023 · 2 comments
Closed

Commitlint not supported #6184

notramo opened this issue Sep 29, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@notramo
Copy link

notramo commented Sep 29, 2023

What version of Bun is running?

official Docker image 1.0.3

What platform is your computer?

x64

What steps can reproduce the bug?

  1. Setup Husky
  2. Add the following to .husky/commit-msg
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

bun run commitlint --edit ${1}
  1. Try to create a new commit in Git.

What is the expected behavior?

Commitlint checks the commit message.

What do you see instead?

131 |     process[exports.REGISTER_INSTANCE] = service;
132 |     // Register the extensions.
133 |     registerExtensions(service.options.preferTsExts, service.extensions.compiled, service, originalJsHandler);
134 |     (0, cjs_resolve_hooks_1.installCommonjsResolveHooksIfNecessary)(service);
135 |     // Require specified modules before start-up.
136 |     module_1.Module._preloadModules(service.options.require);
        ^
TypeError: module_1.Module._preloadModules is not a function. (In 'module_1.Module._preloadModules(service.options.require)', 'module_1.Module._preloadModules' is undefined)
      at register (/home/bun/project/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.7.2_typescript@5.2.2/node_modules/ts-node/dist/index.js:136:4)
      at TypeScriptLoader (/home/bun/project/node_modules/.pnpm/cosmiconfig-typescript-loader@4.4.0_@types+node@20.5.1_cosmiconfig@8.3.6_ts-node@10.9.1_typescript@5.2.2/node_modules/cosmiconfig-typescript-loader/dist/cjs/index.js:52:8)
      at /home/bun/project/node_modules/.pnpm/@commitlint+load@17.7.2/node_modules/@commitlint/load/lib/utils/load-config.js:12:10
      at loadConfig (/home/bun/project/node_modules/.pnpm/@commitlint+load@17.7.2/node_modules/@commitlint/load/lib/utils/load-config.js:10:26)
      at /home/bun/project/node_modules/.pnpm/@commitlint+load@17.7.2/node_modules/@commitlint/load/lib/load.js:19:19
      at load (/home/bun/project/node_modules/.pnpm/@commitlint+load@17.7.2/node_modules/@commitlint/load/lib/load.js:17:20)
      at /home/bun/project/node_modules/.pnpm/@commitlint+cli@17.7.2/node_modules/@commitlint/cli/lib/cli.js:189:19
      at processTicksAndRejections (:55:76)
error: "commitlint" exited with code 1 (SIGHUP)

Additional information

Same error when launched with bun x instead of bun run.

@notramo notramo added the bug Something isn't working label Sep 29, 2023
@notramo notramo changed the title Not compatible with commitlint Commitlint not supported Sep 29, 2023
@imcm7
Copy link

imcm7 commented Oct 2, 2023

The same is here with mikro-orm mikro-orm/mikro-orm#4771 (comment).
And not import if run with bun x instead of bun run.
Was ok prior.

@Electroid
Copy link
Contributor

Duplicate of #6227

@Electroid Electroid marked this as a duplicate of #6227 Oct 2, 2023
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
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