idempotentI
Convex Community2y ago
8 replies
idempotent

Error related to jsx-email ✘ [ERROR] Could not resolve "path"

I just recently updated my packages and installed jsx-email and now I am getting this error bellow:
⠸ Preparing Convex functions...
✘ [ERROR] Could not resolve "path"

    node_modules/.pnpm/clean-css@5.3.3/node_modules/clean-css/lib/options/rebase-to.js:1:19:
      1 │ var path = require('path');
        ╵                    ~~~~~~

  The package "path" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.


I think that this is happening in my email.ts file, I tried adding 'use node'; but then I get:
⠇ Checking for index or schema changes...
✖ Error: Unable to push deployment config to https://adventurous-mockingbird-762.convex.cloud
Error fetching POST  https://adventurous-mockingbird-762.convex.cloud/api/push_config 400 Bad Request: InvalidModules: Hit an error while pushing:
Loading the pushed modules encountered the following
    error:
Uncaught Failed to analyze clerk/emails.js: Unexpected token '<'


Here is the source code of my email.ts:
https://pastebin.com/raw/eFcUZUYB

Is it possible to resolve this if so how?
HSVr1fe.png
Was this page helpful?