Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

330
Vistas
How to resolve "import/no-unresolved" in ESLint for import files! for javascript and nodejs?

THIS is my problems

Eslint cannot find the file's location?

This is the error!

enter image description here

Thank You in advance for the help!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I was having this problem!

Eslint cannot find the file's location because the path of the file is not fully defined, we must specify them in the configuration file.

The reference exists and it works, the problem is that eslint cannot find it. I fix it as follows!

Unable to resolve the module path './Board'. note that Board does not have an extension, that's the problem! We just need to specify eslint how to resolve the extensions and voila.

enter image description here

I assume eslint installed and has problems integrating express node and react js projects

You can use the automatic configuration of eslint follow the steps and when it is installed configure your .eslint.json file add the description of settings

"settings": {
"import/resolver": {
  "node": {
    "extensions": [".js", ".jsx"],
    "moduleDirectory": ["node_modules", "src/"]
  }
}

}

.eslintrc.json the full file look like:

    {
  "env": {
    "browser": true,
    "es2021": true,
    "node": true
  },
  "extends": ["plugin:import/recommended", "plugin:react/recommended", "standard"],
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "ecmaVersion": 12,
    "sourceType": "module"
  },
  "plugins": ["react"],
  "rules": {
    "semi": [2, "always"],
    "comma-dangle": [
      "error",
      {
        "arrays": "only-multiline",
        "objects": "only-multiline",
        "imports": "only-multiline",
        "exports": "only-multiline",
        "functions": "only-multiline"
      }
    ],
    "space-before-function-paren": 0,
    "spaced-comment": [
      "error",
      "never",
      {
        "line": {
          "markers": ["/"],
          "exceptions": ["-", "+"]
        },
        "block": {
          "markers": ["!", "-", "+"],
          "exceptions": ["*"],
          "balanced": true
        }
      }
    ]
  },
  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [".js", ".jsx"],
        "moduleDirectory": ["node_modules", "src/"]
      }
    }
  }
}

https://eslint.org/docs/user-guide/getting-started

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda