在 Centos 7.6 中部署 eggjs 项目,执行 npm run autod 后,再执行 npm install 出现错误:

npm ERR! Cannot read property 'match' of undefined

npm ERR! A complete log of this run can be found in:

尝试删除 node_modules 目录,再执行 npm install 还是一样的错误。

解决方法

删除 node_modules 和 package-lock.json 后重新执行 npm install

标签: Node.js, Egg, CentOS