我正在尝试使用构建Angular 5应用
ng build --prod
。但总是抛出以下错误。
ERROR in /home/prashanth/node_modules/rxjs/_esm5/Subject.js
Module not found: Error: Can't resolve 'tslib' in '/home/prashanth/node_modules/rxjs/_esm5'
ERROR in /home/prashanth/node_modules/rxjs/_esm5/InnerSubscriber.js
Module not found: Error: Can't resolve 'tslib' in '/home/prashanth/node_modules/rxjs/_esm5'
ERROR in /home/prashanth/node_modules/rxjs/_esm5/Subscriber.js
并重复rxjs文件夹中的所有其他目录。
我无法弄清楚为什么会这样。
我正在使用Lubuntu 17.10 64位操作系统。
答案 0 :(得分:1)
尝试删除节点模块目录
rm -rf node_modules
然后重新安装npm包。
npm install