Material-table: v1.68.1 and v1.69.0 use jsPDF v2.0 which throws warning

Created on 16 Aug 2020  Â·  25Comments  Â·  Source: mbrn/material-table

After upgrading to v1.68.1 I get this in the console:

Compiled with warnings.

./node_modules/jspdf/dist/jspdf.umd.min.js
Critical dependency: the request of a dependency is an expression

Probably related: https://github.com/MrRio/jsPDF/issues/2846

Caused by: https://github.com/mbrn/material-table/pull/2311

bug

Most helpful comment

Thanks to @merobal for the info that using jspdf@^2.1.0 fix this issue.

If using yarn you can pin jspdf version to ^2.1.0 in your project's package.json for temporary fix.

"resolutions": {
    "material-table/jspdf": "^2.1.0"
}

All 25 comments

Confirmed; after merging that change, our builds immediately started failing. Will pin to an older version of material-table for now.

I rolled back from 1.68.1 down to 1.68.0 and the warnings are gone. I can now successfully build my React App (whereas build warnings are considered a failure in my CI/CD).

Just my opinion, I don't see how upgrading a major version of a dependency, in this case from [email protected] to [email protected], constitutes a patch version in the material-table library. I would think it would at least be a minor version change.

Hi, I'm having the same issues:

Output from react-scripts start (I'm using TypeScript):

Compiled with warnings.

./node_modules/jspdf/dist/jspdf.umd.min.js
Critical dependency: the request of a dependency is an expression

./node_modules/jspdf/dist/jspdf.umd.min.js
Critical dependency: the request of a dependency is an expression

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

npm list jspdf:

$ npm list jspdf
[email protected] 
└─┬ [email protected]
  └── [email protected] 

I was extremely surprised to see material-table depends on jsPDF for a feature that most of us aren't probably even using... Hopefully this dependency will become optional in the near feature see #2164 #2168

Downgrade jspdf to v1.5.3. It works for me. Warning doesn't appear again.

downgraded to material 1.67 worked for me, hope it will be solved soon

downgraded to material 1.67 worked for me, hope it will be solved soon

@victororlyk You could also opt for downgrading to the previous version of material-table: 1.68.0 .

@benjaminvdb , thanks it is also working.

Do we have any news regarding this? I feel the pdf thing add a lot of code and has warnings

The jspdf team will release a new version with the fix within days
https://github.com/MrRio/jsPDF/issues/2846#issuecomment-678150676
And that version should be pinned in this repo after the release.

Thanks to @merobal for the info that using jspdf@^2.1.0 fix this issue.

If using yarn you can pin jspdf version to ^2.1.0 in your project's package.json for temporary fix.

"resolutions": {
    "material-table/jspdf": "^2.1.0"
}

Use "postinstall": "cd ./node_modules/material-table && npm install [email protected]" for temporary fix.

Also reproducible with material-table 1.69.0.

A path version with the fixes is not yet released. 1.69.0 doesn't contain the fix

@merobal All waiting the version 1.69.1.

Does it work with newest material-table, in case of issues with the table look at: https://github.com/MrRio/jsPDF/issues/2846

Are there any updates on this?

any updates?

Still waiting for @mbrn to release the fixes

Still have issue...

@1ur11 it has been fixed we are awaiting next release.

v1.69.1 is just released, finally 🎉

v1.69.1 is just released, finally 🎉

v1.69.0 is still the latest on the releases page.
https://github.com/mbrn/material-table/releases
When do you think it will be available to pull via npm?

I can confirm that v1.69.1 is working for me, nice work!

Was this page helpful?
0 / 5 - 0 ratings