-
Notifications
You must be signed in to change notification settings - Fork 930
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
fix: Find Up dependancy #4209
Comments
Can you create a minimal repo for reproduction? |
Just reproduced the same issue. The workaround @Joanneyoung01 mentioned does not worked for me worked and is also not ideal in my opinion. Packages Used"devDependencies": {
(...)
"@commitlint/cli": "19.6.1",
"@commitlint/config-conventional": "19.6.0",
(...)
} Log
WorkaroundThe workaround i chose is going back to the following versions. "devDependencies": {
(...)
"@commitlint/cli": "18.6.1",
"@commitlint/config-conventional": "18.6.3",
(...)
} |
I'm unable to reproduce this issue with NPM, Yarn and PNPM with Node.js 20 and 22 - tested with 19.6.0 as well as 19.7.1.
export default {
extends: ["@commitlint/config-conventional"],
rules: {
"subject-empty": [2, "always"],
},
};
{
"type": "module",
"name": "commitlint-repro",
"version": "1.0.0",
"scripts": {
"test": "echo \"test: example commit\" | commitlint "
},
"devDependencies": {
"@commitlint/cli": "19.6.0",
"@commitlint/config-conventional": "19.6.0"
}
} Test result:
@iamfj could you please provide a repro repository for this issue for further investigation? |
Steps to Reproduce
Current Behavior
Seeing the below error message
import { findUp } from ‘find-up’;
^^^^^^
SyntaxError: Named export ‘findUp’ not found. The requested module ‘find-up’ is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from ‘find-up’;
const { findUp } = pkg;
Expected Behavior
I should be able to commit correctly
Affected packages
Possible Solution
I have added Find Up as a dependancy
"dependencies": {
"find-up": "^7.0.0"
}
Context
I would like to be able to remove this dependancy as it's a direct dependancy of the Commit Lint package, not required by my application
commitlint --version
@commitlint/cli": "^19.5.0"
git --version
git version 2.47.1
node --version
v20.9.0
The text was updated successfully, but these errors were encountered: