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] The plugin stops working completely #334

Open
BabakScript opened this issue Mar 5, 2024 · 5 comments
Open

[BUG] The plugin stops working completely #334

BabakScript opened this issue Mar 5, 2024 · 5 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@BabakScript
Copy link

Describe the bug

The plugin stops working completely after upgrading my project with the error below:
image

Conventional Commits: require() of ES Module /workspace/node_modules/.pnpm/@commitlint+config-conventional@19.0.3/node_modules/@commitlint/config-conventional/lib/index.js from /home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js not supported. Instead change the require of index.js in /home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js to a dynamic import() which is available in all CommonJS modules.

I'm using devContainer, PNPM, and node. Whenever I click on the plugin button it shows the error I mentioned in the error box in the vsCode.

Application logs

[info] Extension Activated
[info] vscode.env.language: en
[info] last used version: 1.25.0
[info] Conventional commits started.
[info] VSCode version: 1.87.0
[info] Git version: 1.0.0
[info] VSCode Conventional Commits version: 1.25.0
[info] conventionalCommits.autoCommit: true
[info] conventionalCommits.silentAutoCommit: false
[info] conventionalCommits.emojiFormat: code
[info] conventionalCommits.gitmoji: false
[info] conventionalCommits.lineBreak: 
[info] conventionalCommits.promptBody: true
[info] conventionalCommits.promptCI: false
[info] conventionalCommits.promptFooter: true
[info] conventionalCommits.promptScopes: true
[info] conventionalCommits.scopes: 
[info] conventionalCommits.showEditor: false
[info] conventionalCommits.showNewVersionNotes: true
[info] conventionalCommits.editor.keepAfterSave: false
[info] git.enableSmartCommit: false
[info] git.smartCommitChanges: all
[info] git.postCommitCommand: none
[info] _arg: /workspace
[info] git.repositories: /workspace
[info] workspaceFolders: /workspace
[error] commitlint: The cwd is /workspace
[error] commitlint: Error [ERR_REQUIRE_ESM]: require() of ES Module /workspace/node_modules/.pnpm/@commitlint+config-conventional@19.0.3/node_modules/@commitlint/config-conventional/lib/index.js from /home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js not supported.
Instead change the require of index.js in /home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js to a dynamic import() which is available in all CommonJS modules.
    at h._load (/vscode/vscode-server/bin/linux-arm64/019f4d1419fbc8219a181fab7892ebccf7ee29a2/out/vs/workbench/api/node/extensionHostProcess.js:173:5634)
    at n._load (/vscode/vscode-server/bin/linux-arm64/019f4d1419fbc8219a181fab7892ebccf7ee29a2/out/vs/workbench/api/node/extensionHostProcess.js:170:29786)
    at t._load (/vscode/vscode-server/bin/linux-arm64/019f4d1419fbc8219a181fab7892ebccf7ee29a2/out/vs/workbench/api/node/extensionHostProcess.js:135:35289)
    at Module.require (/home/node/.vscode-server/extensions/humao.rest-client-0.25.1/dist/extension.js:12:12993)
    at /home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22078:19
    at Array.reduce (<anonymous>)
    at loadExtends (/home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22075:16)
    at Object.resolveExtends [as default] (/home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22061:22)
    at Object.load [as default] (/home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:21971:47)
[info] commitlintRuleConfigs:
{}
[info] Conventional commits started.
[info] VSCode version: 1.87.0
[info] Git version: 1.0.0
[info] VSCode Conventional Commits version: 1.25.0
[info] conventionalCommits.autoCommit: true
[info] conventionalCommits.silentAutoCommit: false
[info] conventionalCommits.emojiFormat: code
[info] conventionalCommits.gitmoji: false
[info] conventionalCommits.lineBreak: 
[info] conventionalCommits.promptBody: true
[info] conventionalCommits.promptCI: false
[info] conventionalCommits.promptFooter: true
[info] conventionalCommits.promptScopes: true
[info] conventionalCommits.scopes: 
[info] conventionalCommits.showEditor: false
[info] conventionalCommits.showNewVersionNotes: true
[info] conventionalCommits.editor.keepAfterSave: false
[info] git.enableSmartCommit: false
[info] git.smartCommitChanges: all
[info] git.postCommitCommand: none
[info] _arg: /workspace
[info] git.repositories: /workspace
[info] workspaceFolders: /workspace
[error] commitlint: The cwd is /workspace
[error] commitlint: Error [ERR_REQUIRE_ESM]: require() of ES Module /workspace/node_modules/.pnpm/@commitlint+config-conventional@19.0.3/node_modules/@commitlint/config-conventional/lib/index.js from /home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js not supported.
Instead change the require of index.js in /home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js to a dynamic import() which is available in all CommonJS modules.
    at h._load (/vscode/vscode-server/bin/linux-arm64/019f4d1419fbc8219a181fab7892ebccf7ee29a2/out/vs/workbench/api/node/extensionHostProcess.js:173:5634)
    at n._load (/vscode/vscode-server/bin/linux-arm64/019f4d1419fbc8219a181fab7892ebccf7ee29a2/out/vs/workbench/api/node/extensionHostProcess.js:170:29786)
    at t._load (/vscode/vscode-server/bin/linux-arm64/019f4d1419fbc8219a181fab7892ebccf7ee29a2/out/vs/workbench/api/node/extensionHostProcess.js:135:35289)
    at Module.require (/home/node/.vscode-server/extensions/humao.rest-client-0.25.1/dist/extension.js:12:12993)
    at /home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22078:19
    at Array.reduce (<anonymous>)
    at loadExtends (/home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22075:16)
    at Object.resolveExtends [as default] (/home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22061:22)
    at Object.load [as default] (/home/node/.vscode-server/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:21971:47)
[info] commitlintRuleConfigs:
{}

@BabakScript BabakScript added the help wanted Extra attention is needed label Mar 5, 2024
@geoff-harper
Copy link

I'm getting same after upgrading commitlint from 17 -> 19

@Noxdor
Copy link

Noxdor commented Mar 8, 2024

I am having the same issue, it won't load the config neither as module or commonjs.

@Noxdor
Copy link

Noxdor commented Mar 8, 2024

I fixed it by downgrading @commitlint/cli, @commitlint/config-conventional and @commitlint/types to version 18. Clearly an issue with v19.

@BabakScript
Copy link
Author

I think it will be fixed soon after the release of this PR: conventional-changelog/commitlint#3953

For now, as @geoff-harper and @Noxdor suggested downgrade to the latest stable version as below solve the issue:

  "devDependencies": {

    "@commitlint/cli": "^18.6.1",
    "@commitlint/config-conventional": "^18.6.1",

   }

@maquejp
Copy link

maquejp commented May 6, 2024

I have the same issue with the following version...

"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",

I downgraded to 18.6.1and I do not have the error shown anymore...

Any idea when it will the extension will support 19.x ?

I need to deliver a cli for a dev team to impose strict version so, I need to see if the update will fit our planning.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants