首先使用import在ESM中导入ansi-regex(strip-ansi正在尝试导入和使用的包):
const { Minipass } = require('minipass') const columnify = require('columnify') const ansiTrim = require('../utils/ansi-trim.js') const ansiTrim = require('strip-ansi') // This module consumes package data in the following format: //2...
Uncaught Error: Cannot find module 'strip-ansi' at webpackMissingModule (client:6) at Object.<anonymous> (client:6) at Object../node_modules/webpack-dev-server/client/index.js?http://localhost:8080 (bundle.js:274) at __webpack_require__ (bootstrap:19) at Object.0 (bundle.js:365) ...
"minimatch": "3.0.4", "mkdirp": "0.5.1", "natural-compare": "1.4.0", "optionator": "0.8.2", "path-is-inside": "1.0.2", "pluralize": "7.0.0", "progress": "2.0.0", "regexpp": "1.1.0", "require-uncached": "1.0.3", "semver": "5.5.0", "strip-...