-
-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot statically analyse 'require(…, …)' in line 16 #173
Comments
Any update on this? I'm having the same error when importing the library in an Angular 14 application... |
I don't believe there will be, there are > 50 open issues and no update in the last 5 years. |
This fixed the problem but maybe you have to mess with dependencies... Copy the library and put it in another folder to edit the source of it, then remove this:
And replace all the
Hope it helps! |
Ok, I think I have a better solution. Try this: "markdown-toc-unlazy" https://www.npmjs.com/package/markdown-toc-unlazy Hope this helped you! |
See: https://stackoverflow.com/questions/69898244/cannot-statically-analyse-require-in-line-16
Problem:
When importing markdown-toc in nextjs I am getting the issue. /pages/index.js
import toc from "markdown-toc";
Then I got the below error
Why:
require
gets overwritten by the utils assignment here:The text was updated successfully, but these errors were encountered: