Closed maakle closed 2 months ago
Any work around for this?
@CBYMachumbe So my workaround for this is having a separate project which I created with the CLI like here. I designed the emails there and then simply copied the files over to my actual project and used it there.
Not great but I was able to continue. I would highly appreciate if this problem would be addressed / fixed though!
Will there be a solution here soon?
@maakle I used the react-email as packages on my monorepo with pnpm and it works fine. my server called the packages and use functions that send email with react-email templates
nothing helped, including installing canary. I moved everything from the client dir to root. That fixed it. Weird
nothing helped, including installing canary. I moved everything from the client dir to root. That fixed it. Weird
You had a mono repo with backend & frontend or what do you mean with moving client dir to root?
Not root, my bad, I meant to say .react-email. I just set it up automatically with npx create-email@latest, and cut all the contents from .react-email/client to .react-email, replacing all the files that were already there.
nothing helped, including installing canary. I moved everything from the client dir to root. That fixed it. Weird
You had a mono repo with backend & frontend or what do you mean with moving client dir to root?
I cannot reproduce this bug, can someone confirm it's still happening? These are the steps I followed to attempt to replicate:
npm install react-email@latest
./emails
folder with the email componentsnpx email dev
, this will create the /.react-email/
folder./react-email/
to .gitignore
npm install
npx email dev
The .react-email/src/...
directory was created as expected and everything ran well.
Hey @EduardoFazolo I just created a sample project but can confirm, that I couldn't replicate the issue with the latest version. See https://github.com/maakle/react-email-bug that it worked!
That being said, I also just went back to my main project and did the following:
react-email
from package.json
and ran yarn
to remove the package.react-email
folderyarn add react-email@latest
-> Upgraded to 1.9.4
, i was previously on 1.9.3
And that seem to have done the trick. It regenerated the react-email files and I was able to run email dev
again.
So I don't know what happened but it works again. Seems like magic or you did something in the minor upgrade from 1.9.3
to 1.9.4
Can anyone else confirm that this also worked for them who experienced the same problem? Then I can close the issue.
I had this same problem.
As an alternative solution I created the project using the manual way as recommended in the documentation and it didn't happen anymore
https://react.email/docs/getting-started/manual-setup#1-create-directory
This fails for me now, too. Both yarn and npm, @latest and 1.9.3.
But it worked before I started messing with things to figure out how to properly install addons (since the yarn method warns me to use -W
).
I could restore from my Git repo, but that doesn't include node_modules
or .react-email
. So whatever is causing this new problem must be within one of those folders. (Great work, Sherlock, I know.)
For me deleting .react-email
folder and running email dev
again fixed the issue.
Closing this as we don't include a .react-email
directory at all anymore as of react-email@2.0.0
. You all can upgrade to our latest — react-email@2.1.0
— and things should be much smoother on all aspects.
The upgrade shouldn't be very hard, but if you do find any issues, you can mention me, or look into the guide at https://resend.com/blog/react-email-2#upgrade-instructions for upgrade instructions.
Describe the Bug
I am unable to start the dev mode and receive the following error:
Inside the .react-email folder it seems the file went missing with everything else. the src folder is empty. Also reinstalling my dependencies on root level doesn't bring them back. Also removing
react-email
from my package.json and adding it back, doesn't bring it back. Is there a way how I can regenerate them?I suspect it might have something to do with my .gitignore file. I added the the
/.react-email/
folder to it, since the repo otherwise is getting too big.Did anyone experience the same or have an idea how to solve this?
Which package is affected (leave empty if unsure)
react-email
Link to the code that reproduces this issue
https://github.com/resendlabs/react-email/blob/main/package.json
To Reproduce
Try adding react-email to an existing project. Add
/.react-email/
to your ignore. Commit things to git. Try reinstalling.Expected Behavior
Dev mode to start
What's your node version? (if relevant)
16.16.0