Closed tcatic closed 3 weeks ago
Are you by any means using yarn with pnp somewhere above that project? That might be the reason.
From our Discord, someone had this exact issue and fixed by deleting the pnp.cjs
file
Are you by any means using yarn with pnp somewhere above that project? That might be the reason.
From our Discord, someone had this exact issue and fixed by deleting the
pnp.cjs
file
That was it! I didn't use pnp (never actually have so I'm not sure where it came from), but I had .pnp.cjs .pnp.loader.mjs
in my home directory. After deleting both it worked. Thank you very much for your help!
Describe the Bug
We (our team) have been playing around with react-email and trying to make it work locally with the automatic setup (in an empty repository). We have followed the steps in the docs and we still can't make it work. We would get the two errors:
Could not resolve "react/jsx-runtime"
andCould not resolve "react"
. The second one we managed to fix by changing the imports fromimport React from 'react';
toimport * as React from 'react';
.Can somebody help us debug the issue and get to the bottom of it? We ran our code in the cloud and an Ubuntu VM and it worked completely fine.
These are the logs from our attempt to integrate it in our codebase but the same errors happen in a clean environment following the docs:
NPM version: 20.12.2 Yarn: 3.6.1. react-email: 2.1.1. OS: MacOs M1 & M2 machines
Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://react.email/docs/getting-started/automatic-setup
To Reproduce
Followed the instructions in the docs and everything was broken
Expected Behavior
For everything to work š
What's your node version? (if relevant)
20.12.2