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

496
Vistas
Module not found: Error: Can't resolve existing module

I am importing two modules from the same package.

import { RowSelection } from "gridjs/plugins/selection";
import { Grid } from "gridjs";

I can access RowSelection in VSCode (e.g. by go to definition) just fine. Intellisense is working fine too. Therefore the module definition seems okay.

My issue is that webpack is successful for Grid but fails for RowSelection with the following error message:

Module not found: Error: Can't resolve 'gridjs/plugins/selection' in 'C:\workspace\src' 

The error message is correct as well. The module definitely does not exist in the mentioned path. It is in '../node_modules/gridjs/plugins/selection'.

I don't understand, why it is not searching in the node modules directory the same way as it is doing for Grid though.

Why is RowSelection resolved differently than Grid and what can I do to fix this issue?

This is my webpack configuration:

const webpackMerge = require("webpack-merge");
const baseDashboardConfig =
  require("@splunk/webpack-configs/dashboard.config").default;
const baseConfig = require("@splunk/webpack-configs").default;

module.exports = webpackMerge(baseConfig, {
  entry: "./src/details_dialog.js",
  output: {
    path: __dirname,
    filename: "details_dialog.js",
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        //exclude: [/node_modules/],
        use: [
          {
            loader: "style-loader",
          },
          {
            loader: "css-loader",
          },
        ],
      },
    ],
  },
});
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The only thing that comes to mind is that you've not included .tsx files with your .ts files in your base webpack config? The clue is that the source file for rowSelection is rowSelection.tsx (error) and gridjs is gridjs.ts (no error). That might explain the error message since rowSeletion.tsx is not getting transpiled by webpack, and therefore cannot be found in the src folder.

about 4 years ago · Juan Pablo Isaza Denunciar

0

Apparently this is not in issue with my configuration but has been reported as an issue with gridjs (https://github.com/grid-js/gridjs/issues/969)

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