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

Module not found #3938

Closed
1 of 4 tasks
DanielCastronovo opened this issue Feb 27, 2024 · 4 comments · Fixed by #3939
Closed
1 of 4 tasks

Module not found #3938

DanielCastronovo opened this issue Feb 27, 2024 · 4 comments · Fixed by #3939
Labels

Comments

@DanielCastronovo
Copy link

Expected Behavior

Module not found

Current Behavior

npm notice 
file:///usr/local/lib/node_modules/@commitlint/cli/lib/cli.js:131
        throw err;
        ^

Error: Cannot find module "@commitlint/config-conventional" from "/home/circleci/project"
    at resolveId (file:///usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/resolve-extends/lib/index.js:143:17)
    at tryResolveId (file:///usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/resolve-extends/lib/index.js:130:12)
    at resolveConfig (file:///usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/resolve-extends/lib/index.js:117:20)
    at file:///usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/resolve-extends/lib/index.js:81:26
    at Array.reduce (<anonymous>)
    at loadExtends (file:///usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/resolve-extends/lib/index.js:80:22)
    at resolveExtends (file:///usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/resolve-extends/lib/index.js:57:28)
    at load (file:///usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/load/lib/load.js:44:28)
    at async main (file:///usr/local/lib/node_modules/@commitlint/cli/lib/cli.js:204:20) {
  code: 'MODULE_NOT_FOUND'
}

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Steps to Reproduce

const LINE_LENGTH = 120;
const TYPES = ["chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "release"];

module.exports = {
  extends: ["@commitlint/config-conventional"],
  rules: {
    "body-max-line-length": [2, "always", LINE_LENGTH],
    "header-max-length": [2, "always", LINE_LENGTH],
    "type-enum": [2, "always", TYPES],
  },
};

Context

circle-ci orbs:
commitlint: conventional-changelog/commitlint@1.0.0

commitlint.config.js

const LINE_LENGTH = 120;
const TYPES = ["chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "release"];

module.exports = {
  extends: ["@commitlint/config-conventional"],
  rules: {
    "body-max-line-length": [2, "always", LINE_LENGTH],
    "header-max-length": [2, "always", LINE_LENGTH],
    "type-enum": [2, "always", TYPES],
  },
};](url)

commitlint --version

commitlint/cli@19.0.0

git --version

git --version

node --version

v20

@DanielCastronovo
Copy link
Author

It seems to be related to this issue : #3936

JounQin added a commit to JounQin/commitlint that referenced this issue Feb 27, 2024
JounQin added a commit to JounQin/commitlint that referenced this issue Feb 27, 2024
JounQin added a commit to JounQin/commitlint that referenced this issue Feb 27, 2024
escapedcat pushed a commit that referenced this issue Feb 27, 2024
…e global packages correctly (#3939)

* fix: drop `resolve-from`, `resolve-global` and `import-fresh`, resolve global packages correctly

close #3938

* chore: fix Windows compatible issue
@escapedcat
Copy link
Member

@chrepl
Copy link

chrepl commented Feb 27, 2024

Global import works for me, again. Thank you

@DanielCastronovo
Copy link
Author

Thanks you ! it's works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants