grid-js / gridjs

Advanced table plugin
https://gridjs.io
MIT License
4.39k stars 240 forks source link

Error Cannot find module '/src/i18n/language' or its corresponding type declarations. #1421

Open peopeo opened 8 months ago

peopeo commented 8 months ago

I get this error when importing grid.js (6.1.1) into a stencil web component (no shadow DOM, just custom element)

The exact error is:

node_modules/gridjs/dist/index.d.ts: import useSelector from './src/hooks/useSelector'; import { useTranslator } from '/src/i18n/language';

After looking into file "node_modules/gridjs/dist/index.d.ts" I made the following change in line 14 (adding a leading dot) and it worked correctly:

import { useTranslator } from '/src/i18n/language'; --> import { useTranslator } from './src/i18n/language';