Closed snake-py closed 2 years ago
Bystander here. You're likely better off following one of the examples for MathJax v3 https://github.com/mathjax/MathJax-demos-node/.
As Peter mentions, you probably want to switch to MathJax v3 for this. MathJax-node was a hack to get MathJax v2 to work in node applications, and is pretty clumsy in many respects. Version 3 was redesigned in order to allow it to work in node applications more naturally, and to give more control within the browser as well.
I am not familiar with vercel, but it appears that this is for creating web pages; mathJax-node should not be used in a browser, so unless this is running on the server to generate the pages, this is the wrong application of mathjax-node. With MathJax v3, you should be able to work in the browser or on the server with essentially the same code.
@dpvc I took a different approach and use Mathjax now in the front.
FYI - vercel is a serverless function hosting. It is often used for serving frontends, but it also runs node for backend functions.
Thank you for your help
@pkra I had a look at the repo. What is in the way that this is published to NPM? I maybe would give it another try to incorporate it into my project.
The demos repository is not in an npm module, but you could use a GitHub reference to load it directly from the repository.
I am trying to deploy this to vercel but I am getting an error that the file could not be located. I am at a loss here, perhaps someone here has an idea for me? Locally it is working fine.
package.json
API:
Error: