Closed aidan-rypens closed 10 months ago
Would love to help you out, but please first follow the instructions and create a reproduction using one of the options listed in the issue template.
Sure, I ran the following:
npm create jsx-email
.
This starter project doesn't build nor can it run the check.
Not trying to be difficult here, we just ask everyone (even maintainers) to follow the same instructions. The template has the following content right before inputs:
🚨 Issues WITHOUT a valid reproduction WILL BE CLOSED!
Please provide one by:
- Using the StackBlitz reproduction template at https://stackblitz.com/fork/jsx-email-repro
Provide a minimal repository link (Read https://gist.github.com/Rich-Harris/88c5fc2ac6dc941b22e7996af05d70ff for instructions). Please use NPM for installing dependencies! These may take more time to triage than the other options.
⚠️ ZIP Files are unsafe and maintainers will NOT download them.
I worked on the create-jsx-email
package just a day or so ago and tested it working and just ran it again and it's working fine here. So unless you can provide an actual repro with code I can look at, like a stackblitz with the output of the command on your end, there's really nothing I can do for you to help
Tweaked the exports inspection logic in any event. Maybe jsx-email@1.1.2 will work for your case.
@shellscape I understand, here is the stackblitz url:
https://stackblitz.com/edit/jsx-email-repro-wjaq7f?file=templates%2FReproduction.tsx
Updating to 1.1.2
gives the error that React is not defined.
Here's my fork off of yours: https://stackblitz.com/edit/jsx-email-repro-9j4pkr?file=package.json
I updated to 1.1.2 and ran pnpm i
to make sure the newest version was installed, and then ran pnpm build
. It successfully built:
Also for what it was worth, without forking yours, I was able to update jsx-email and run build. This screenshot is from your stackblitz:
@shellscape By adding import * as React from "react";
it does indeed work. (sorry)
Not sure why it was not added though, because I generated with the CLI as an example. The CLI create command does generate a sample with the import. I may have removed the line by accident, weird.
Thanks for having a look!
No wories! Glad it worked out
To reproduce:
npx email create BatmanEmail
npx email build ./BatmanEmail.tsx
Error:
Rendering the component out & emailing runs fine. However, because the layout received in the mailbox does not match the one from the preview and therefore wanted to debug a bit.