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

ERR_IMPORT_ASSERTION_TYPE_MISSING with json config package #3970

Open
1 of 4 tasks
stefanprobst opened this issue Mar 11, 2024 · 0 comments
Open
1 of 4 tasks

ERR_IMPORT_ASSERTION_TYPE_MISSING with json config package #3970

stefanprobst opened this issue Mar 11, 2024 · 0 comments

Comments

@stefanprobst
Copy link

stefanprobst commented Mar 11, 2024

Steps to Reproduce

  1. clone repro in https://github.com/stefanprobst/issue-commitlint-json
  2. install deps with pnpm install and run pnpm run lint
  3. see error message:
TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///data/Development/playground/com/node_modules/.pnpm/@acdh-oeaw+commitlint-config@1.0.0_@commitlint+cli@19.0.3/node_modules/@acdh-oeaw/commitlint-config/commitlintrc.json" needs an import attribute of type "json"
    at validateAttributes (node:internal/modules/esm/assert:89:15)
    at defaultLoad (node:internal/modules/esm/load:153:3)
    at async ModuleLoader.load (node:internal/modules/esm/loader:409:7)
    at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:45)
    at async link (node:internal/modules/esm/module_job:76:21) {
  code: 'ERR_IMPORT_ASSERTION_TYPE_MISSING'

Current Behavior

extending a package with provides a .json commitlint config currently fails with "ERR_IMPORT_ASSERTION_TYPE_MISSING" error.

Expected Behavior

should work like it did with version 18.

see the v18 branch in the issue reproduction repo, which works.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Context

No response

commitlint --version

@commitlint/cli@19.0.3

git --version

git version 2.43.2

node --version

v20.11.1

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

No branches or pull requests

2 participants