当我尝试执行 ng serve 命令时,'node_module/terser' 中出现未处理的异常

An unhandled exception occured in 'node_module/terser' ,when I tried to execute ng serve command

当我尝试为根文件夹中的特定 angular 项目执行 ng serve 时,我遇到了这个异常。

异常:一个未处理的异常 occured:No 为 'path.../node_module/terser'

找到了有效的主要出口

我使用的npm版本是6.13.1

这个问题与我的 npm 有关吗?

根据this github issue,大概

在你再次发球之前试试这个

npm install npm@latest -g

如果这不起作用,您的 npm 是什么版本?你可以通过

找到答案
npm -v