How to use GoogleChrome/lighthouse library with Flowise since it is an ES module? #3890
kasun97cdz
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have tried to use GoogleChrome/lighthouse library inside a custom tool node as below. But since it is an ES module, I met with an error saying it does not work with require(). I tried importing dynamically as well but it did not work.
My code:
Error that I've got:
Tool run errored with error: "require() of ES Module D:\exp\learning\project-exp\Flowise\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\lighthouse\core\index.js fromD:\exp\learning\project-exp\Flowise\node_modules\.pnpm\@FlowiseAI[email protected]\node_modules\@FlowiseAI\nodevm\lib\resolver-compat.js not supported.\nInstead change the require of index.js in D:\exp\learning\project-exp\Flowise\node_modules\.pnpm\@FlowiseAI[email protected]\node_modules\@FlowiseAI\nodevm\lib\resolver-compat.js to a dynamic import() which is available in all CommonJS modules.
Any solution for this ? To utilize GoogleChrome/lighthouse library ?
Beta Was this translation helpful? Give feedback.
All reactions