pupudu / window-table

Windowing Table for React based on React Window

Home Page:https://window-table.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lodash-es dependencies are required to install

erik4github opened this issue · comments

If using npm install window-table --save , the lodash dependencies aren't installed with. So when using webpack-dev-server to build, you'll run into:

ERROR in ./node_modules/window-table/dist/window-table.esm.js
Module not found: Error: Can't resolve 'lodash-es/debounce' in 'C:\...path\node_modules\window-table\dist'
 @ ./node_modules/window-table/dist/window-table.esm.js 3:0-42 428:11-19 801:11-19
 @ ./src/app.js
 @ ./src/index.js

ERROR in ./node_modules/window-table/dist/window-table.esm.js
Module not found: Error: Can't resolve 'lodash-es/isEqual' in 'C:\...path\node_modules\window-table\dist'
 @ ./node_modules/window-table/dist/window-table.esm.js 4:0-40 414:9-16
 @ ./src/app.js
 @ ./src/index.js

If I install the lodash-es libraries, project builds fine.

Not sure if it's more appropriate to mark them as dependencies rather than peer dependencies, or just make a note in the documentation when installing via npm.

Hi @erik4github Thanks for reporting this issue. Yes, we should make it a dependency. Will do that as soon as I get some time.

Hi @erik4github What's the window-table version you tried? Because I just noticed that we are no longer using lodash-es.

Thanks

Just published v0.10.3 with @types/lodash-es replaced with @types/lodash. That may have been the issue for you. Please let us know if 0.10.3 fixes the issue for you. Thanks.

Just found the issue. Tsdx is transforming lodash usages to lodash-es usages, obviously, for reducing the bundle size. I just added lodash-es to fix that problem. Please install v0.10.4

Ref: https://github.com/jaredpalmer/tsdx#using-lodash

Cheers