ERR_IMPORT_ASSERTION_TYPE_MISSING with json config package
stefanprobst opened this issue · comments
stefanprobst commented
Steps to Reproduce
- clone repro in https://github.com/stefanprobst/issue-commitlint-json
- install deps with
pnpm install
and runpnpm run lint
- 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