mathjax-react icon indicating copy to clipboard operation
mathjax-react copied to clipboard

Typescript error when running `tsc` in CI

Open danny-does-stuff opened this issue 3 years ago • 1 comments
trafficstars

This is a strange problem and I'm not sure the root cause. The issue is that running tsc in my project works fine when run locally, but when running in our CI pipeline it chokes on mathjax-react. The error I'm getting is

node_modules/mathjax-react/dist/utils/index.d.ts(1,28): error TS2307: Cannot find module './useMathJax' or its corresponding type declarations.

Any help would be appreciated!

danny-does-stuff avatar Oct 06 '22 14:10 danny-does-stuff

Update: it appears to be a simple problem of the file casing being wrong. In dist/utils/index.d.ts it imports from useMathJax, but the file is actually named useMathjax.d.ts. This error doesn't appear on our local machines because we are on macOS which is case insensitive. It looks like the file has the wrong name in the build folder. I could attempt to fix this, but I'm not sure how rollup works or how the build process is setup. Hopefully this is an easy fix!

danny-does-stuff avatar Oct 06 '22 14:10 danny-does-stuff