wodka
wodka5d ago

I wanted to use the mjml package to convert mjml to html inside an action (use node)

400 Bad Request: InvalidModules: Hit an error while pushing: Loading the pushed modules encountered the following error: Uncaught Failed to analyze _deps/node/XFDVFWVQ.js: Cannot find module '../lib/utils.js' Require stack: - /tmp/source/16f94bae-1bb4-4903-9bf3-9144d234af50/modules/_deps/node/2QUL6X5D.js at <anonymous> (../../../node_modules/.pnpm/uglify-js@3.19.3/node_modules/uglify-js/tools/node.js:4:12) at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31) at <anonymous> (../../../node_modules/.pnpm/html-minifier@4.0.0/node_modules/html-minifier/src/htmlminifier.js:10:29) at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31) at <anonymous> (../../../node_modules/.pnpm/mjml-core@4.15.3/node_modules/mjml-core/lib/index.js:102:49) at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31) at <anonymous> (../../../node_modules/.pnpm/mjml-core@4.15.3/node_modules/mjml-core/lib/index.js:430:71 any idea on how to solve this?
3 Replies
Convex Bot
Convex Bot5d ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
wodka
wodkaOP5d ago
it does break here: https://github.com/mishoo/UglifyJS/blob/master/tools/node.js#L4 - checking now if that package allone causes the error
GitHub
UglifyJS/tools/node.js at master · mishoo/UglifyJS
JavaScript parser / mangler / compressor / beautifier toolkit - mishoo/UglifyJS
wodka
wodkaOP5d ago
to solve it just override the following: "pnpm": { "overrides": { "uglify-js": "npm:terser" } } it is not used within mjml, so any override is fine

Did you find this page helpful?