Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-dev-utils@12.0.1 for the project I'm working on.
strip-ansi not found error due to strip-ansi v7 being a Es module only package. Changed the package name to strip-ansi-cjs.
Here is the diff that solved my problem:
diff --git a/node_modules/react-dev-utils/FileSizeReporter.js b/node_modules/react-dev-utils/FileSizeReporter.js
index b2b4cc6..d7c0df5 100644
--- a/node_modules/react-dev-utils/FileSizeReporter.js
+++ b/node_modules/react-dev-utils/FileSizeReporter.js
@@ -12,7 +12,7 @@ var path = require('path');
var chalk = require('chalk');
var filesize = require('filesize');
var recursive = require('recursive-readdir');
-var stripAnsi = require('strip-ansi');
+var stripAnsi = require('strip-ansi-cjs');
var gzipSize = require('gzip-size').sync;
function canReadAsset(asset) {
diff --git a/node_modules/react-dev-utils/eslintFormatter.js b/node_modules/react-dev-utils/eslintFormatter.js
index 4e8280c..61ee60f 100644
--- a/node_modules/react-dev-utils/eslintFormatter.js
+++ b/node_modules/react-dev-utils/eslintFormatter.js
@@ -9,7 +9,7 @@
const path = require('path');
const chalk = require('chalk');
-const stripAnsi = require('strip-ansi');
+const stripAnsi = require('strip-ansi-cjs');
const table = require('text-table');
const cwd = process.cwd();
This issue body was partially generated by patch-package.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-dev-utils@12.0.1for the project I'm working on.strip-ansinot found error due to strip-ansi v7 being a Es module only package. Changed the package name to strip-ansi-cjs.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.