我在 mint 中运行 create-react-app 时遇到错误

我在 mint 中运行 create-react-app 时遇到错误
node:internal/modules/cjs/loader:998 throw err; ^

Error: Cannot find module '@npmcli/config'
Require stack:
- /usr/share/nodejs/npm/lib/utils/config/definition.js
- /usr/share/nodejs/npm/lib/utils/config/definitions.js
- /usr/share/nodejs/npm/lib/utils/config/flatten.js
- /usr/share/nodejs/npm/lib/utils/config/index.js
- /usr/share/nodejs/npm/bin/npx-cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/usr/share/nodejs/npm/lib/utils/config/definition.js:33:5)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/share/nodejs/npm/lib/utils/config/definition.js',
    '/usr/share/nodejs/npm/lib/utils/config/definitions.js',
    '/usr/share/nodejs/npm/lib/utils/config/flatten.js',
    '/usr/share/nodejs/npm/lib/utils/config/index.js',
    '/usr/share/nodejs/npm/bin/npx-cli.js'
  ]
}

相关内容