本人将node 版本由v14.13.0升级到v14.18.2,解决
internal/process/esm_loader.js:74
internalBinding(‘errors’).triggerUncaughtException(
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. Received protocol ‘node:’
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:782:11)
at Loader.resolve (internal/modules/esm/loader.js:85:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:229:28)
at ModuleWrap. (internal/modules/esm/module_job.js:51:40)
at link (internal/modules/esm/module_job.js:50:36) {
code: ‘ERR_UNSUPPORTED_ESM_URL_SCHEME’
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! summary-eadela@ lint:staged: lint-staged
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the summary-eadela@ lint:staged script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\qing\AppData\Roaming\npm-cache_logs\2021-12-28T08_43_33_796Z-debug.log
husky - pre-commit hook exited with code 1 (error)
git 未能顺利结束 (退出码 1) (8672 ms @ 2021/12/28 16:43:33)