react-email: `email dev` command always fails on Windows
Describe the Bug
I am using the latest version of React Email (2.0.0) and Next.js (13.5.4)
When I run “email dev” I get the following error:
Running preview at: http://localhost:3000
⠙ Getting react-email preview server ready...
Error: > Couldn't find any `pages` or `app` directory. Please create one under the project root
But I clearly do have an app directory… what’s going on? Also don’t really want to upgrade to Next 14 atm, because it’ll break some things.
Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://github.com/lazlothemonkey/reactemail_test
To Reproduce
Just run “npm run email”
Expected Behavior
I expect to run the email preview server
What’s your node version? (if relevant)
No response
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 9
- Comments: 31 (1 by maintainers)
This has been fixed under
react-email@2.1.0-canary.1, stable release soon!There’s already a PR open for this issue, #1216, and here’s a patch as a quick workaround for now:
this fixed it for me!
nvm node v18.17.1
Yes this has fixed. Many thanks 😃
@kapilrc The above issue you mention is the one that the patch and the PR #1216 fixes.
About the other issue you saw with the
1.x.xis something that used to happen here and there, so if you try enough I think it might not be an error.@kapilrc Seems like you’re using the
1.x.xversion for the CLI. If you usereact-email@2.0.0you won’t have that issue you are mentioning anymore. That being said this issue (#1225) is for the2.0.0version, not the1.x.x.See https://resend.com/blog/react-email-2