Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

504
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda