-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esm compatiblity issue on react-email
with strip-ansi
#1075
Comments
can confirm this happened in my project as well, cannot run tests to complete github action |
First time running Deleting node_modules and reinstalling didn't fix it. Using version 1.10.0 EDIT: Manage to get it working using npm instead of yarn, not sure why |
@atadeuccislideworks That's interesting, could you give a reproduction so I can test it and maybe find out what's wrong in your situation? This shouldn't be happening and I'll work on a fix for it |
I'll try to reproduce |
@gabrielmfern yeah, unfortunately I wasn't able to reproduce consistently the issue, managed once in a new folder, then couldn't make it happen again and I tried a bunch, it's one of those weird ones. One issue that always happened was #977. Thanks anyway ✌ |
I have the same issue, first time after install it works and on second run it stops working. Tried both node versions 18 and 20 - without difference. EDIT: I am using Yarn as default package manager. I tried installing using NPM and then running via Yarn and now it seems to work. |
I also get this error when creating the project from template. Steps to reproduce:
Steps to resolve issue:
|
See comment regarding a bug with yarn: #1130 (comment) |
react-email
with strip-ansi
because of ora
react-email
with strip-ansi
because of ora
react-email
with strip-ansi
Closing this as it is an issue with yarn, eslint/eslint#17215 (reply in thread). |
Describe the Bug
`
const stripAnsi = require('strip-ansi');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module D:\reps\react-email-starter\node_modules\strip-ansi\index.js from D:\reps\react-email-starter\node_modules\ora\index.js not supported.
Instead change the require of D:\reps\react-email-starter\node_modules\strip-ansi\index.js in D:\reps\react-email-starter\node_modules\ora\index.js to a dynamic import() which is available in all CommonJS modules.
at Object. (D:\reps\react-email-starter\node_modules\ora\index.js:7:19)
at Object. (D:\reps\react-email-starter\node_modules\react-email\dist\source\utils\generate-email-preview.js:10:31)
at Object. (D:\reps\react-email-starter\node_modules\react-email\dist\source\utils\index.js:20:14)
at Object. (D:\reps\react-email-starter\node_modules\react-email\dist\source\commands\dev.js:7:17)
at Object. (D:\reps\react-email-starter\node_modules\react-email\dist\source\index.js:8:15) {
code: 'ERR_REQUIRE_ESM'
}
`
Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://github.com/resendlabs/react-email
To Reproduce
{ "name": "emails", "version": "0.0.18", "scripts": { "dev": "email dev", "export": "email export" }, "dependencies": { "@react-email/components": "0.0.6", "react-email": "1.9.3" } }
Expected Behavior
The development server doesn't start
What's your node version? (if relevant)
18.17.1
The text was updated successfully, but these errors were encountered: