Closed rm-arun-kumar closed 3 years ago
First of all, I have no idea what this really means :-p But it seems that you are using webpack, not rollup -- or maybe rollup calls webpack somewhere. In any case, this is a webpack warning. So if it is just a warning, it should work anyway. Here is one of the issues that mentions this message: https://github.com/moment/moment/issues/5489
whoops, I just noticed that I quoted moment, not webpack. Well, in case this "warning" cannot be ignored, please give me a way to reproduce the problem so that I can take a look.
So if it is just a warning, it should work anyway
Yes.
But, I published this project as a NPM package and used it by installing it for another project. Since I used Webpack in that project, I am getting the below error
All the contents from the latex.mjs
file are thrown as an error.
I raised the above issue based on this error. If the critical dependency warning
is not the reason for this issue then what can be the solution?.
The clear Screen shot is here.!
Yeah, it's a clear screenshot but I still have no idea what is going on. How can I reproduce this?
I am really sorry, I do not know how to explain this to you clearly. But resolved this.
Reason:-
I missed the entry in the webpack.resolve.alias
Solution:-
After I added the 'latex.js': path.resolve(__dirname, "../node_modules/latex.js/dist/latex.js")
line in webpack configuration, I am not getting any errors ( except Critical dependency warning ).
Thanks for your time @michael-brade :smile:
I see! That makes sense in a way :grin: But strange is: why doesn't it pick up the main
entry in latex.js's package.json
? Hm...
I also have that doubt. :thinking: .
This is my code
I am using rollup for my project. when I am running the rollup, end of the task I am getting the below error.
./node_modules/latex.js/dist/latex.js Critical dependency: the request of a dependency is an expression @ ./packages/src/js/index.js @ ./node_modules/react-styleguidist/lib/loaders/styleguide-loader.js!./node_modules/react-styleguidist/lib/client/index.js @ ./node_modules/react-styleguidist/lib/client/index.js @ multi ./node_modules/react-styleguidist/lib/client/index ./node_modules/react-dev-utils/webpackHotDevClient.js
What should I do?