当我使用 npm 时,出现此错误。每个 npm 命令最终都会显示以下错误(Ubuntu 20.04):internal/modules/cjs/loader.js:834 throw err; ^Error: Cannot find module 'semver'Require stack:- /usr/share/npm/lib/utils/unsupported.js- /usr/share/npm/bin/npm-cli.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15) at Function.Module._load (internal/modules/cjs/loader.js:687:27) at Module.require (internal/modules/cjs/loader.js:903:19) at require (internal/modules/cjs/helpers.js:74:18) at Object.<anonymous> (/usr/share/npm/lib/utils/unsupported.js:2:14) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) at Module.load (internal/modules/cjs/loader.js:879:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Module.require (internal/modules/cjs/loader.js:903:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '/usr/share/npm/lib/utils/unsupported.js', '/usr/share/npm/bin/npm-cli.js' ]}
添加回答
举报
0/150
提交
取消