Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

498
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!