import-js/eslint-plugin-import

module is installed but "Unable to resolve path to module 'windows-1252' import/no-unresolved"

rafipiccolo opened this issue · 1 comments

nodejs: 23.4.0
eslint: 9.16.0
eslint-plugin-import: 2.31.0

when i run eslint i get this error

mytest.js
  2:30  error  Unable to resolve path to module 'windows-1252'  import/no-unresolved

the file only does

import * as windows1252 from 'windows-1252';

i have this package in my package.json

{
  dependencies: {
    "windows-1252": "^3.0.4"
  }
}

The package exists and is in my node_modules folder.
it contains a package.json stating this

node_modules/windows-1252/package.json
{
    "exports": "./windows-1252.mjs",
    "files": [
		"LICENSE-MIT.txt",
		"windows-1252.mjs",
		"windows-1252.d.ts"
    ],
    "types": "windows-1252.d.ts",

all thoses files exist

Is it a bug in this plugin or in windows-1252 ?
Other packages seem to be recognized just fine.

This plugin doesn’t yet support “exports”, and that package doesn’t define “main”. When resolve supports the exports field, so will we.