试图建立角度5应用程序。错误:无法解决问题' tslib' in' / node_modules / rxjs / _esm5'

时间:2018-05-22 05:58:42

标签: angular rxjs

我正在尝试使用构建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位操作系统。

1 个答案:

答案 0 :(得分:1)

尝试删除节点模块目录

rm -rf node_modules

然后重新安装npm包。

npm install