mathjax/MathJax-demos-node

why mathjax in node 16, after init , mathjax is null

TangsWang opened this issue · 1 comments

import mathjax from 'mathjax'
.....
      mathjax.init({
        loader: {
          load: ['input/tex-full'],
        },
        tex: {
          packages: 'base, autoload, ams, newcommand, require'.split(/\s*,\s*/),
        },
      })
        .then(mj => {
          if (!mj) {
            reject(`mathjax instance is undefined.`)
          } else {
            mj.tex2mmlPromise(math).then(mml => resolve(mml))
          }
        })
        .catch(err => reject(err.message))

will report error: mathjax instance is undefined.

i was using nuxt3. it is ok onlocal, but error on vercel. i don't know why?

dpvc commented

Please see this post for details.