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

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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 37
  • Comments: 25 (5 by maintainers)

Commits related to this issue

Most upvoted comments

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

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 jspdf@1.5.3 to jspdf@2.0.0, constitutes a patch version in the material-table library. I would think it would at least be a minor version change.

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"
}

@merobal All waiting the version 1.69.1.

Still waiting for @mbrn to release the fixes

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 .

v1.69.1 is just released, finally 🎉

Still have issue…

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

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

@benjaminvdb , thanks it is also working.

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
my-app@1.0.0 
└─┬ material-table@1.68.1
  └── jspdf@2.0.0