当我尝试执行npm audit fix
命令时,得到错误:
> coa@2.1.3 preinstall /Users/dulin/workspace/xxx/xxx-m/node_modules/coa
> start /B node compile.js & node compile.js
sh: start: command not found
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module '/Users/dulin/workspace/xxx/xxx-m/node_modules/coa/compile.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
我读过这个问题:找不到模块coa/comile.js。但没有一个答案对我有效。
我的项目没有直接使用coa
包作为依赖项,我发现svgo
包使用了它,postcss-svgo
包在package-lock.json
中使用了svgo
包。
我该如何解决这个问题?
请紧急检查此线程,因为coa包被劫持,恶意代码被注入
https://github.com/veged/coa/issues/99
这里还有
https://www.bleepingcomputer.com/news/security/popular-coa-npm-library-hijacked-to-steal-user-passwordsu/