MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

initialize:160 Error loading MathJax: TypeError: Cannot set property Package of #<Object> which has only a getter

Open quanzhongxian opened this issue 1 year ago • 1 comments

import "mathjax-full/es5/tex-svg-full"; image

quanzhongxian avatar Sep 26 '24 03:09 quanzhongxian

This is a duplicate of #3106, and the earlier #3079.

Because this is occurring while handling the MathJax configuration, we can't use the usual MathJax.startup.ready() function to fix it. It is fixed in v4 (currently in beta release), but not in v3.

The fix is in this commit. You could edit the ts/components/global.ts file to make the combineConfig() function be

https://github.com/mathjax/MathJax-src/blob/43bb7d905c1891f0fd3b5459dc0ec2f90c650845/ts/components/global.ts#L85-L102

and recompile it using npm run -s compile, then rebuild the tex-svg-full component using npm run -s make-components (which will rebuild everything, so it will take a while), that should allow it to work for you.

Sometimes the presence of a MathJax configuration can prevent this. There is also some discussion in #3079 about it, but no other solution.

dpvc avatar Sep 30 '24 20:09 dpvc

Fixed in v4.0

dpvc avatar Aug 13 '25 14:08 dpvc