Javascript 角度8 ng构建prod给出错误
我最近将我的项目从angular 7迁移到angular 8。一切都很好,但当我试着构建prod它时,它给出了下面的错误Javascript 角度8 ng构建prod给出错误,javascript,angular,migration,Javascript,Angular,Migration,我最近将我的项目从angular 7迁移到angular 8。一切都很好,但当我试着构建prod它时,它给出了下面的错误 ERROR in Error during template compile of 'Ng2CompleterModule' Could not resolve @angular/http relative to [object Object],[object Object],[object Object].. npm ERR! code ELIFECYCLE npm ER
ERROR in Error during template compile of 'Ng2CompleterModule'
Could not resolve @angular/http relative to [object Object],[object Object],[object Object]..
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Timer@1.0.0 ng-high-memory-build-prod: `node --max_old_space_size=8000
./node_modules/@angular/cli/bin/ng build --aot --prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Timer@1.0.0 ng-high-memory-build-prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ryan\AppData\Roaming\npm-cache\_logs\2020-09-09T10_06_55_527Z-debug.log
我猜@angular/http模块在angular 8中不存在,所以我已经从所有地方删除了它,但这个问题仍然存在。请帮忙我遗漏了一些真正能帮助你的信息,所以这只是一个猜测 你使用的是一个为Angular 2设计的npm包 我敢打赌,正是这个组件导致了您的问题 不幸的是,在这种情况下,当npm包不再更新时,您唯一能做的就是寻找替代方案,集成一个新包非常耗时,但这是唯一的方法
似乎有助于实现ng2completer的目标谢谢你的回答。我卸载了ng2completer并重新安装了它,它工作了。卸载在这里很重要,因为简单地更新包是不起作用的。